Skip to content

Commit fdaf83d

Browse files
authored
feat(web): show per-agent binding and routing on the Dynamic Workflow card (#239)
## Related Issue No issue. Sixth step of the subagent routing work. Stacked on #237 (merge #234#237 first; until then this diff includes their commits). ## Problem The Dynamic Workflow card showed one shared model label and a flat member list. A mixed workflow — resumed children that kept an older model, a forced policy, a pool default — had no explanation, failures were not prominent, and nothing said that a policy change only applies to new subagents. ## What changed - Header: the count once (`3 / 9`) plus a status pill. Body opens with a routing line: `MAIN <model · effort>` and `SUBAGENTS` as `Inherit → …`, `<model> · Override`, or `Mixed · N models` with a breakdown (`2 Sol · Max · 1 Luna · High`). Policy provenance (`Model policy: Saved setting|Default`) and feature provenance (`Feature: Enabled by environment|Saved setting|Default`) render on separate lines. A forced policy offers a `Change in Settings` chip that opens Settings → Agent. - Rows grouped by phase with severity-aware order (running with failures: Failed, Suspended, Working, Queued, Completed, Cancelled; running healthy: Working first; settled: Failed first, residual Working/Queued kept visible); Failed/Suspended always expanded, Completed collapsed while running with `Show ›`. Each row: name, activity, `Profile · Model · Effort`, elapsed (`m:ss`, `now-startedAt` live / `completedAt-startedAt` settled), a provenance word (`Inherited`, `Pool`, `Forced`, `Forked`, `Resume existing`), and `Created under earlier routing · Current main: <model>` when the row's environment revision differs from the current one. The notice `Applies to new subagents; N existing keep their model` is driven only by the environment revision, never by model ids or decision fingerprints. - Segmented progress: one cell per task up to 12 rows, proportional grouped bar beyond; only the active row dot pulses. Sizes use the existing tokens. - Pure helpers (`groupDynamicWorkflowRows`, `dynamicWorkflowRowElapsedMs`, `formatElapsed`) in `dynamicWorkflowCardRows.ts`; `App.vue` provides `mainModelBinding` and `openAgentSettings`; Settings accepts `initialTab: 'agent'`. `dist-web` rebuilt. Tests: grouping order/expansion/empty phases, both elapsed formulas and formatting (`dynamic-workflow-card-rows.test.ts`); component: header count once, cells at 9 vs grouped bar at 13, Failed-first only with failures, MAIN/inherit/mixed + provenance words, policy and feature lines independent, Override chip only for `policy-force` and opens Settings, notice from revision mismatch only, meta + elapsed per row (`dynamic-workflow-card.test.ts`). ## Checklist - [x] I have read the [CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md) document. - [ ] I have linked a related issue (external PRs: the issue must have a maintainer's `/approve`). - [x] I have added tests that prove my feature works. - [x] Ran `gen-changesets` skill, or this PR needs no changeset. - [x] Ran `gen-docs` skill, or this PR needs no doc update. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Enhanced Dynamic Workflow cards with subagent details, routing sources, provenance, model metadata, elapsed times, and revision notices. * Grouped workflow members by phase, showing failures first, with collapsible sections and clearer progress indicators. * Added settings for folding completed turns and consecutive tool-call activity. * Added clearer experimental-setting indicators and direct navigation to agent settings. * **Bug Fixes** * Improved handling of overlapping configuration updates to prevent stale information from being displayed. * **Tests** * Expanded coverage for workflow grouping, routing states, metadata, progress, and elapsed-time displays. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 7b00f1f commit fdaf83d

104 files changed

Lines changed: 1194 additions & 434 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-code": minor
3+
---
4+
5+
The Dynamic Workflow card shows each subagent's profile, model, thinking effort, elapsed time, and routing source, groups rows by phase with failures first, and notes when running subagents were created under an earlier routing.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"sourceHash": "94836c566a254baa2f20df81ee4f4b6d4b3e864d5b745ae52520e51cdf8edd38",
2+
"sourceHash": "f7f3ed6157809fd616d25b246300a55af33b2e2893911910ae1a2742c790b499",
33
"sourceFileCount": 407
44
}

apps/pythinker-code/dist-web/assets/CodeBlockNode-CkWGOoPy.js renamed to apps/pythinker-code/dist-web/assets/CodeBlockNode-Bidu8-un.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/DesignSystemView-CawZlySe.js renamed to apps/pythinker-code/dist-web/assets/DesignSystemView-CZk8453S.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/Tooltip-DZgmUg0c.js renamed to apps/pythinker-code/dist-web/assets/Tooltip-BctK2XcE.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Ce4XLoR7.js renamed to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-BAqRO8Bh.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/arc-CkU32Xx8.js renamed to apps/pythinker-code/dist-web/assets/arc-H6nfPZnv.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-BueXoHLB.js renamed to apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-CXQ7WtjQ.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)