Commit fdaf83d
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
- .changeset
- apps
- pythinker-code/dist-web
- assets
- pythinker-web
- src
- components
- chat/tool-calls
- settings
- i18n/locales/en
- lib
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments