fix(workflow): make Dynamic Workflow rows readable and close three gaps - #41
Conversation
The member row measured the streamed detail at full length before the task, so a finished agent's summary left the task one character wide and every row read as ".". Budget the row instead: the task keeps a floor and a share, the detail takes what is left. Streamed deltas carried a closed line into the next delta, so one message fused into a single string that grew for as long as the agent talked and filled all three activity slots with the same prefix. Track the pending line apart from the displayed one and cap it.
… gaps Saving a workflow wrote a SKILL.md into a root the open session had already scanned. The registry is built once at construction, so the file was invisible and /<name> stayed a plain message until the session reloaded. Session.reloadSkills re-discovers it, and the two half-refresh methods in the TUI collapse into one that reloads before it rebuilds. A permission rule naming a model parsed and then never fired: the Agent matcher globbed it against the profile name. Rule subjects now carry the model a call explicitly asks for, namespaced so an existing profile rule cannot start matching a same-named model. Auto mode approved the DynamicWorkflow call itself, so the plan preview never rendered for the mode the start prompt offers by default. Auto now asks once per distinct plan; a session grant or an allow rule falls through, and yolo is unchanged. Corrects the tool and config reference, which still described a progress cube the TUI no longer draws, claimed argument patterns were unsupported, and omitted disable_workflows and workflow_size_guideline.
… shipped them 0.9.1, 0.10.0 and 0.11.0 have changelog blocks but appear on neither npm nor any git tag: a Version Packages PR bumped them and the publish step never completed. Their entries describe merged work, which reached users in 0.12.0, so the entries move there rather than being dropped with the headings. The version list now matches npm exactly. Entry count and PR set are unchanged.
`prompt_template` is optional, so a caller may pass a whole prompt as each item. Every agent row then opened with the same paragraph and the task column clipped inside it, leaving six rows that named nothing. Measure the shared head across every member, cut it at the last shared word boundary, and mark the elision with a single column. The elision is all-or-nothing and skipped for a short head, so a column never means two different things and a mark never costs more than it frees.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 22 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates Dynamic Workflow approval and model matching, adds session skill reloading, improves TUI and VS Code workflow status rendering, and records release and configuration changes. ChangesDynamic Workflow updates
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
commit: |
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (3)
packages/agent-core/test/tools/agent.test.ts (1)
74-86: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMove the runnable-execution guard out of the test body.
Oxlint reports conditional test bodies at Lines 74 and 86. Use a shared helper that unwraps a runnable
ToolExecution, then keep this test as direct assertions.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/agent-core/test/tools/agent.test.ts` around lines 74 - 86, Add a shared test helper that unwraps a successful ToolExecution and throws for errors, then use it when resolving executions in this test. Replace the inline isError guards around onOpus and inherited with the helper so the test body contains only direct assertions and avoids conditional test statements.Source: Linters/SAST tools
docs/reference/tools.md (1)
94-94: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSplit the Dynamic Workflow reference into focused paragraphs.
Line 94 combines inputs, model selection, limits, execution behavior, approval rules, and permission matching. Split these into focused paragraphs or subsections. Keep all existing content.
As per coding guidelines, “keep one idea per paragraph.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/reference/tools.md` at line 94, Restructure the DynamicWorkflow reference around the existing content into focused paragraphs or subsections, keeping every detail unchanged. Separate workflow inputs and item behavior, subagent model selection, limits and execution lifecycle, tool-call restrictions, approval behavior, and permission matching so each paragraph covers one idea.Source: Coding guidelines
apps/pythinker-code/test/tui/commands/dynamic-workflow.test.ts (1)
450-456: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove the unnecessary conditional from the ordering assertion.
The supplied Oxlint result flags the
?? 0expression at Line 455 undervitest(no-conditional-in-test). The earlier expectations already prove both calls occurred, so compare the two invocation orders directly.Proposed fix
- (host.refreshSkillCommands as ReturnType<typeof vi.fn>).mock.invocationCallOrder[0] ?? 0, + (host.refreshSkillCommands as ReturnType<typeof vi.fn>).mock.invocationCallOrder[0],🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/pythinker-code/test/tui/commands/dynamic-workflow.test.ts` around lines 450 - 456, Remove the unnecessary nullish-coalescing fallback from the invocation-order assertion in the dynamic workflow test, comparing reloadSkills and refreshSkillCommands invocation orders directly. Keep the preceding call-count expectations unchanged.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/plan-preview-in-auto-mode.md:
- Line 2: Change the `@pythoughts/pythinker-code` bump in
.changeset/plan-preview-in-auto-mode.md:2 from minor to major for the auto-mode
approval change. Keep the `@pythoughts/pythinker-code` bump in
.changeset/model-permission-rules.md:2 as minor; no change is required there.
In @.changeset/saved-workflow-invocable.md:
- Line 2: Update the changeset to include the public
`@pythoughts/pythinker-code-sdk` package with an additive minor release bump
alongside `@pythoughts/pythinker-code`, covering the new reloadSkills API exposed
by the SDK.
In `@apps/pythinker-code/src/tui/commands/config.ts`:
- Line 1201: Move the host.refreshSkillCommands(host.session) call to execute
after reloadSession() completes in the session reload flow, matching the
ordering used by /reload so it reads the refreshed skill registry.
In
`@apps/pythinker-code/src/tui/components/messages/dynamic-workflow-mission-control.ts`:
- Around line 286-294: The streaming update around combined, pending, and
setLatest must record every nonempty line from a multi-line delta in order
instead of only latestNonEmptyLine(combined). Split combined into lines, emit
each completed line through the existing activity-recording path, preserve only
the unclosed suffix in member.carry, and add a regression test covering several
lines delivered in one assistant.delta.
- Around line 1085-1087: Update the whitespace regular expression in
normalizeText to include the Unicode flag, changing its flags from global-only
to global plus Unicode while preserving the existing whitespace normalization
behavior.
In `@apps/pythinker-code/src/tui/pythinker-tui.ts`:
- Around line 434-439: Update refreshSkillCommands and its callers to track a
monotonically increasing refresh generation and source session, applying
listSkills results only when both still match the current session and
generation. Ignore stale successes and failures, and clear skillCommands and
skillCommandMap when listing skills fails for the current session instead of
retaining commands from the previous session.
In `@docs/configuration/config-files.md`:
- Around line 85-86: Update the top-level default_permission_mode description to
state that auto normally skips approval but DynamicWorkflow still asks for
approval in auto mode. Keep the existing permission-mode behavior and other
field descriptions unchanged.
In `@docs/release-notes/changelog.md`:
- Around line 37-40: Update the referenced changelog entries to wrap commands,
values, and identifiers in backticks: use `API key`, `off`, `low`, `medium`,
`high`, `xhigh`, `/update`, `anyOf`, `/login`, `/provider`, `pythinker provider
catalog add`, and `--api-key <key>`. Apply the same formatting consistently
across the additional referenced entries without changing their wording.
In `@packages/agent-core/src/session/index.ts`:
- Around line 1128-1131: Update reloadSkills() to rebuild
agent.config.systemPrompt after loadSkills() so the rendered {{ PYTHINKER_SKILLS
}} listing reflects newly saved workflows while preserving the existing
readiness and skill-loading sequence. Add a Vitest regression test that saves or
registers a new workflow, calls reloadSkills(), and verifies the active system
prompt includes it.
---
Nitpick comments:
In `@apps/pythinker-code/test/tui/commands/dynamic-workflow.test.ts`:
- Around line 450-456: Remove the unnecessary nullish-coalescing fallback from
the invocation-order assertion in the dynamic workflow test, comparing
reloadSkills and refreshSkillCommands invocation orders directly. Keep the
preceding call-count expectations unchanged.
In `@docs/reference/tools.md`:
- Line 94: Restructure the DynamicWorkflow reference around the existing content
into focused paragraphs or subsections, keeping every detail unchanged. Separate
workflow inputs and item behavior, subagent model selection, limits and
execution lifecycle, tool-call restrictions, approval behavior, and permission
matching so each paragraph covers one idea.
In `@packages/agent-core/test/tools/agent.test.ts`:
- Around line 74-86: Add a shared test helper that unwraps a successful
ToolExecution and throws for errors, then use it when resolving executions in
this test. Replace the inline isError guards around onOpus and inherited with
the helper so the test body contains only direct assertions and avoids
conditional test statements.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 35026664-833a-49bf-9b39-20ec9eec56f1
📒 Files selected for processing (36)
.changeset/dynamic-workflow-activity-lines.md.changeset/dynamic-workflow-shared-task-preamble.md.changeset/dynamic-workflow-task-column.md.changeset/model-permission-rules.md.changeset/plan-preview-in-auto-mode.md.changeset/saved-workflow-invocable.mdapps/pythinker-code/CHANGELOG.mdapps/pythinker-code/src/tui/commands/config.tsapps/pythinker-code/src/tui/commands/dispatch.tsapps/pythinker-code/src/tui/commands/dynamic-workflow.tsapps/pythinker-code/src/tui/commands/reload.tsapps/pythinker-code/src/tui/components/messages/dynamic-workflow-mission-control.tsapps/pythinker-code/src/tui/constant/rendering.tsapps/pythinker-code/src/tui/pythinker-tui.tsapps/pythinker-code/test/tui/commands/dynamic-workflow.test.tsapps/pythinker-code/test/tui/commands/experiments.test.tsapps/pythinker-code/test/tui/commands/reload.test.tsapps/pythinker-code/test/tui/components/messages/dynamic-workflow-mission-control.test.tsdocs/configuration/config-files.mddocs/reference/tools.mddocs/release-notes/changelog.mdpackages/agent-core/src/agent/permission/policies/dynamic-workflow-plan-ask.tspackages/agent-core/src/agent/permission/policies/index.tspackages/agent-core/src/rpc/core-api.tspackages/agent-core/src/rpc/core-impl.tspackages/agent-core/src/session/index.tspackages/agent-core/src/session/rpc.tspackages/agent-core/src/tools/builtin/collaboration/agent.tspackages/agent-core/src/tools/builtin/collaboration/dynamic-workflow.tspackages/agent-core/src/tools/support/rule-match.tspackages/agent-core/test/agent/permission.test.tspackages/agent-core/test/session/init.test.tspackages/agent-core/test/tools/agent.test.tspackages/agent-core/test/tools/builtin-current.test.tspackages/node-sdk/src/rpc.tspackages/node-sdk/src/session.ts
reloadSkills refreshed the registry but not the rendered prompt, so a workflow saved mid-session was invocable as `/<name>` and still absent from the skill listing the model reads. Agent gains a prompt-only re-render that leaves the active tool set and turn limit alone, and remembers the profile its prompt was built from so a main agent on a custom profile is not re-rendered as the default. A member row recorded only the last line of a delta, so a provider that packed several closed lines into one chunk lost the rest. Every closed line is now its own event; the unclosed tail is shown but is not one. refreshSkillCommands applied whichever listing finished last. Several callers start it without awaiting, so a slow list for the session the user just left could land on the one they switched to. A generation guard drops stale results, and a failure now clears commands that belong to another session. Applying experimental flags rebuilt the command set before reloadSession, so it read the registry the reload was about to replace. Also: bump the SDK for the new public reloadSkills, note the auto-mode approval exception in the config reference, split the DynamicWorkflow reference into one idea per paragraph, and format changelog values as code.
The per-agent bar was filled by `stepCount / busiest lane`. That compares agents to each other rather than measuring progress through anything, so agents doing similar amounts of work all sat near full and never visibly moved — the card read as stuck while the run was fine, and it needed a caption underneath to explain what the bar even meant. A running lane now shows the silver spinner the webview already ships, and the caption and the bar are gone. The header bar stays: agents finished over agents started is the one ratio on the card that is true and that moves when something happens. A lane also kept spinning after the workflow returned. The tool call had a result and one lane still read as running, so the card showed live work for an agent that was cancelled or cut off with the turn. Once the result is in, those lanes are marked `no result` and counted under the list instead. Rows are a table now — status, label, current activity, counts — so the counts line up in a column, and the activity line folds into the row rather than taking a second line per agent.
`/yolo` and `/auto` toggle when sent without an argument, and the chat never showed which mode was in effect. Sending `/yolo` to make sure YOLO was on turned it off instead, and nothing on screen said so — the next tool call asked for approval and the command looked broken rather than inverted. The host already fetched the mode for every status announce and dropped it before sending. It now rides along, a mode change announces itself to every attached view, and the composer carries a red badge for YOLO and AUTO in the same danger colour the terminal footer uses. Manual stays unlabelled.
|
All 9 inline findings and the 3 nitpicks are triaged — 7 fixed, 5 dismissed with rationale on-thread. Head is now 722c011. Fixed
Dismissed
Every new test was mutation-checked — each one fails when the guard it covers is removed. This push also carries two VS Code fixes outside the review: the workflow card no longer renders a fake per-agent progress bar or keep spinning lanes after the workflow returned, and the chat now shows the live permission mode, which is what made a bare |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (4)
apps/vscode/webview-ui/src/components/index.ts (1)
27-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse a star re-export.
This non-root
index.tsfile should re-exportPermissionModeBadgewithexport * from "./PermissionModeBadge".As per coding guidelines, “In non-root
index.tsfiles, prefer re-exports such asexport * from './module'.”🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/vscode/webview-ui/src/components/index.ts` at line 27, Update the non-root index.ts export for PermissionModeBadge to use a star re-export from "./PermissionModeBadge" instead of a named re-export.Source: Coding guidelines
apps/vscode/webview-ui/src/components/PermissionModeBadge.tsx (1)
1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReplace
@/imports with#/imports.Use the preferred alias consistently in changed TypeScript imports.
apps/vscode/webview-ui/src/components/PermissionModeBadge.tsx#L1-L1: replace@/components/ui/tooltipwith#/components/ui/tooltip.apps/vscode/webview-ui/src/components/WorkflowCard.tsx#L4-L5: replace both@/lib/...imports with#/lib/....As per coding guidelines, “Use
import ... from '#/...'in preference to the equivalent@/...alias.”🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/vscode/webview-ui/src/components/PermissionModeBadge.tsx` at line 1, Replace the tooltip import alias in PermissionModeBadge.tsx at apps/vscode/webview-ui/src/components/PermissionModeBadge.tsx#L1-L1 with the preferred `#/` path, and update both lib imports in WorkflowCard.tsx at apps/vscode/webview-ui/src/components/WorkflowCard.tsx#L4-L5 from `@/` to `#/`. Preserve the imported symbols and module paths.Source: Coding guidelines
packages/agent-core/src/agent/index.ts (1)
362-371: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtend the
reloadSkills re-renders the skill listing the model readstest. It already covers the non-default profile, prompt update, and unchanged tool setter calls. Add assertions that the active tool names andmaxStepsPerTurnare unchanged.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/agent-core/src/agent/index.ts` around lines 362 - 371, Extend the existing reloadSkills re-renders the skill listing the model reads test to capture and assert that the active tool names and maxStepsPerTurn remain unchanged after refreshSystemPrompt; preserve its current non-default profile, prompt update, and tool setter call assertions.Source: Path instructions
apps/pythinker-code/test/tui/commands/experiments.test.ts (1)
91-95: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove the conditional fallback from this test assertion.
?? 0triggersvitest(no-conditional-in-test). Assert both mocks were called, then compare their first call orders directly. This also gives clearer failures when a call is missing.Proposed fix
+ expect(host.session.reloadSession).toHaveBeenCalled(); + expect(host.refreshSkillCommands).toHaveBeenCalled(); expect(host.session.reloadSession.mock.invocationCallOrder[0]).toBeLessThan( - host.refreshSkillCommands.mock.invocationCallOrder[0] ?? 0, + host.refreshSkillCommands.mock.invocationCallOrder[0], );🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/pythinker-code/test/tui/commands/experiments.test.ts` around lines 91 - 95, Update the assertion in the reload-session test to first assert that both reloadSession and refreshSkillCommands were called, then compare their first invocationCallOrder values directly. Remove the ?? 0 fallback from the invocation-order comparison.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/agent-core/src/agent/index.ts`:
- Line 127: Add a Vitest case for refreshSystemPrompt using a non-default
profile, asserting that the active tools and config.maxStepsPerTurn are
preserved after refresh. Keep the existing _activeProfile name unchanged.
In `@packages/agent-core/src/session/index.ts`:
- Around line 1142-1156: Update reloadSkills() to call
main.tools.refreshBuiltinTools() after loadSkills() completes, ensuring newly
available builtin skill tools are registered. Preserve the existing active-tool
selection and system-prompt refresh behavior, and add coverage that invokes the
newly available skill without changing active tools.
---
Nitpick comments:
In `@apps/pythinker-code/test/tui/commands/experiments.test.ts`:
- Around line 91-95: Update the assertion in the reload-session test to first
assert that both reloadSession and refreshSkillCommands were called, then
compare their first invocationCallOrder values directly. Remove the ?? 0
fallback from the invocation-order comparison.
In `@apps/vscode/webview-ui/src/components/index.ts`:
- Line 27: Update the non-root index.ts export for PermissionModeBadge to use a
star re-export from "./PermissionModeBadge" instead of a named re-export.
In `@apps/vscode/webview-ui/src/components/PermissionModeBadge.tsx`:
- Line 1: Replace the tooltip import alias in PermissionModeBadge.tsx at
apps/vscode/webview-ui/src/components/PermissionModeBadge.tsx#L1-L1 with the
preferred `#/` path, and update both lib imports in WorkflowCard.tsx at
apps/vscode/webview-ui/src/components/WorkflowCard.tsx#L4-L5 from `@/` to `#/`.
Preserve the imported symbols and module paths.
In `@packages/agent-core/src/agent/index.ts`:
- Around line 362-371: Extend the existing reloadSkills re-renders the skill
listing the model reads test to capture and assert that the active tool names
and maxStepsPerTurn remain unchanged after refreshSystemPrompt; preserve its
current non-default profile, prompt update, and tool setter call assertions.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 10d0c2cc-38e3-470f-ba7f-14d14c05f9e0
📒 Files selected for processing (24)
.changeset/saved-workflow-invocable.mdapps/pythinker-code/CHANGELOG.mdapps/pythinker-code/src/tui/commands/config.tsapps/pythinker-code/src/tui/components/messages/dynamic-workflow-mission-control.tsapps/pythinker-code/src/tui/pythinker-tui.tsapps/pythinker-code/test/tui/commands/experiments.test.tsapps/pythinker-code/test/tui/components/messages/dynamic-workflow-mission-control.test.tsapps/vscode/shared/legacy-sdk.tsapps/vscode/src/runtime/session-runtime.tsapps/vscode/test/event-handlers.test.tsapps/vscode/test/pythinker-runtime.test.tsapps/vscode/webview-ui/src/components/PermissionModeBadge.tsxapps/vscode/webview-ui/src/components/WorkflowCard.tsxapps/vscode/webview-ui/src/components/index.tsapps/vscode/webview-ui/src/components/inputarea/InputArea.tsxapps/vscode/webview-ui/src/lib/workflow-lanes.tsapps/vscode/webview-ui/src/stores/chat.store.tsapps/vscode/webview-ui/src/stores/event-handlers.tsdocs/configuration/config-files.mddocs/reference/tools.mddocs/release-notes/changelog.mdpackages/agent-core/src/agent/index.tspackages/agent-core/src/session/index.tspackages/agent-core/test/session/init.test.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- apps/pythinker-code/src/tui/commands/config.ts
- apps/pythinker-code/test/tui/components/messages/dynamic-workflow-mission-control.test.ts
- docs/configuration/config-files.md
- docs/release-notes/changelog.md
- apps/pythinker-code/CHANGELOG.md
- apps/pythinker-code/src/tui/components/messages/dynamic-workflow-mission-control.ts
…keep Cover what refreshSystemPrompt is not allowed to touch: reloadSkills now asserts the active tool names and maxStepsPerTurn are unchanged, and a new case shows a skill saved into an empty root is invocable after the reload. Also replace the ?? 0 index fallback in the experiments call-order assertion with a non-null assertion, so a missing call reports the missing call rather than a comparison against a sentinel, and use a star re-export for PermissionModeBadge.
|
All findings triaged in 579e093. The two inline threads are answered and resolved on-thread; the four nitpicks and the pre-merge warning are below. Applied
Not applied
Applied differently
Pre-merge warning
Validation
The new assertions were mutation-checked: making |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/agent-core/test/session/init.test.ts`:
- Around line 1262-1266: Extend the test around reloadSkills() to invoke the
registered Skill tool on main with the audit-routes skill, and assert that
activation succeeds. Keep the existing skill-listing and setActiveTools
assertions, ensuring the test exercises the registry lookup and fails if
activation is broken.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6db8c9cf-3cdd-4278-b868-c65ebe025a56
📒 Files selected for processing (3)
apps/pythinker-code/test/tui/commands/experiments.test.tsapps/vscode/webview-ui/src/components/index.tspackages/agent-core/test/session/init.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- apps/vscode/webview-ui/src/components/index.ts
- apps/pythinker-code/test/tui/commands/experiments.test.ts
Asserting the Skill tool is present and the registry holds the skill does not exercise the lookup that activation performs. Call the tool with audit-routes and check it does not error, so a broken lookup fails the test that claims the skill is invocable.
Related Issue
No open issue — the problems are described below.
Problem
Five defects, all found while watching real Dynamic Workflow runs.
The Dynamic Workflow card was unreadable.
..prompt_templateis optional, so a caller may pass a whole prompt as each item. Every row then opened with the same paragraph and the task column clipped inside it — six rows readingYou are auditing the pythinker-code mono...name nothing.Three workflow behaviors did not do what they said.
/<name>stayed a plain message until the session reloaded.DynamicWorkflowcall itself, so the plan preview never rendered for the mode the start prompt offers by default.The changelog did not match npm. 0.9.1, 0.10.0 and 0.11.0 have changelog blocks but appear on neither npm nor any git tag: a Version Packages PR bumped them and the publish step never completed.
What changed
Card layout. The row is budgeted instead of measured left to right: the task keeps a floor and a share, the detail takes what is left. The pending streamed line is tracked apart from the displayed one and capped, so activity shows the last three lines an agent wrote.
Shared task preamble. The preamble every task repeats is measured across every member, cut at the last shared word boundary, and replaced by a one-column mark. Four guards keep it honest, each covered by a test that fails when the guard is removed:
The prefix is measured across every member rather than the visible ones, so it does not rewrite itself as rows scroll.
Workflow behavior.
Session.reloadSkillsre-discovers a saved workflow, and the two half-refresh methods in the TUI collapse into one that reloads before it rebuilds. Rule subjects now carry the model a call explicitly asks for, namespaced so an existing profile rule cannot start matching a same-named model. Auto mode asks once per distinct plan; a session grant or an allow rule falls through, and yolo is unchanged.Docs and changelog. The tool and config reference no longer describes a progress cube the TUI stopped drawing, no longer claims argument patterns are unsupported, and now covers
disable_workflowsandworkflow_size_guideline. Entries from the three never-published versions move into 0.12.0, which is what actually shipped them; the entry count and PR set are unchanged.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Summary by CodeRabbit
New Features
Bug Fixes
Documentation