Repository navigation
refactor: move the workflow run views out of the workflows app - #36348
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. This is a path-only move of core views out of the app directory. A boundary test pins the move, and no reader outside the patch still names the old paths. [DESIGN-REVIEWED] 886614f Description read[DESCRIPTION-READ] e04e9e676bcc3aec166bf6f3ea868bf2dfe9efc1acdc66170c4811d955ce4290 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff only moves files: the moved views are 100% renames, and every other source change is an import path. No string, control or render changes, so the missing screenshots leave no evidence gap. [UX-REVIEWED] 886614f Description read[DESCRIPTION-READ] f5952689ceb58ae37fd928aae7f427137407dc38152c50c2edd2483170cd8eab That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This change only moves files and changes import paths, which the frozen Goal requires; it changes no default, surface or rendered output. Inventory (6 items) — 6 justifiedIntent: let the Workflows app leave the repository without taking the chat, sidebar and Customize → Workflows run views with it. This is a FIX: it removes a dependency of core on an app directory, under #26967.
[FIRST-PRINCIPLES-REVIEWED] 886614f Description read[DESCRIPTION-READ] f5600257b297485db044609763c43b30eef9d674e49120f7ff01fcb7e4c0ca69 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
dfeda3e to
952d1fb
Compare
952d1fb to
13ba715
Compare
|
|
13ba715 to
fd6ce14
Compare
|
Rebased onto main to pick up #36457: the only red on 13ba715 was |
Code change approver recommendation: ApproveWhy: the decider estimates a 6% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. This is a path-only refactor. All 11 workflow run-view modules move from src/apps/workflows/ to src/components/workflows/ as 100% renames. Both directories are at the same depth, so their ../../ imports still resolve, and their ./ imports only point at sibling files that moved with them. Every core importer, vi.mock target, capture script, the RadioChipGroup file list, features.json and the docs were updated, and a repo-wide search finds no leftover reference to the old module paths. The one dropped re-export (groupByPhase/latestBudget) had a single test reader, and it now imports runModel directly. The new workflowsBoundary.test.ts follows the existing 14-file per-app boundary pattern; the only core importer left is the builtinRegistry lazy row, which the test allows. The UI-location registry and committed UI index don't name the moved files. Frontend lint/typecheck, ratchets/i18n and bundle-size checks passed; the frontend test shards were still pending at review time. No behaviour, state or trust boundary changes. An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
|
The one red left on fd6ce14 is |
fd6ce14 to
6c7c8e3
Compare
The run tree, run graph, source panel, Runs list, run snapshot hook and the event-stream and plan models lived under website/src/apps/workflows/ although the chat, the session sidebar and Customize > Workflows render them and they read only the core run registry at /api/workflows/*. Core imported the app from 34 modules, so the app could not leave the repository without taking core UI with it. They move to website/src/components/workflows/ unchanged. The app keeps its /workflows page, which now imports them from core, and its page tests move beside it. A boundary test pins that core reaches the app only through its builtinRegistry.ts row. Part of #26967
6c7c8e3 to
886614f
Compare
|
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review checked head 886614f. The 11 view and model files move from apps/workflows/ to components/workflows/ as 100% renames, at the same directory depth, so every relative import inside them still resolves. Every other source edit is an import line. No old apps/workflows/ path is left anywhere in the repo, and that includes vi.mock paths, capture, playwright and config files. The only re-export this PR drops had one reader, which now imports runModel directly. The Author/Runs switch-label case moved over with no assertion dropped.
Done well: workflowsBoundary.test.ts asserts the exact set of importers allowed outside the app. It also self-tests every import spelling it relies on, so a later change to the regex cannot quietly stop it from matching. At the merge base, 34 core files outside the app imported it. At head, none do.
Optional:
website/src/apps/workflows/WorkflowsPage.tsx:315-317: the comment still says the helpers are "re-exported above" for the WorkflowsPage.test unit tests. This PR removes that re-export, so the comment is now wrong.website/src/components/workflows/runModel.ts:7-8and three test file headers still nameWorkflowsPage.test.ts. That file is nowworkflowRunModel.test.ts.- When #25471 reaches main, its core imports of
apps/workflows/kas/will fail the new boundary test. The PR body already mentions this.
Problem / Motivation
Goal: Let the Workflows app leave the repository without taking the core workflow run views (chat, session sidebar, Customize → Workflows) with it.
The run tree, run graph, source panel, Runs list, run snapshot hook and the event-stream and plan models live under
website/src/apps/workflows/, but they are core UI: the chat side panel, the progress bar, the run cards, the session sidebar and the Customize → Workflows tab render them, and they read only the core run registry at/api/workflows/*. 34 core modules import the app directory today, so the app cannot be moved out, adopted or later deleted without breaking those core surfaces.Why it matters
The built-in app campaign moves every app out of core (stage A: core infrastructure that lives under an app directory moves into core). Until this lands, deleting or externalizing the
workflowsapp would remove the run views from every chat that runs a workflow, for every user, whether or not they ever enabled the hidden app.Not a goal
workflowsapp itself, or changing its/workflowspage, its backend or its manifest.apps.workflows.*catalog keys the moved views read.What changed (motivation → approach → change)
The views are core in everything but location, so they move to
website/src/components/workflows/byte for byte (git sees pure renames), and every core importer, test and capture script points there (an import-line change only inwebsite/src/pages/,website/src/hooks/websocket/turnCompletion.ts,website/src/lib/closeBusyGate.ts,website/src/store/chat/workflows.tsandwebsite/src/utils/sessionKeys.ts). The app keeps only its/workflowspage (the Author view over its own backend, plus the core Runs list), which now imports the views from core and no longer re-exports the run-model helpers for tests. Its page tests move beside it, and the one page case inWorkflowsPluralCounts.test.tsxmoves intoWorkflowsPage.switchLabels.test.tsx.workflowsBoundary.test.tspins that core reaches the app only through itsbuiltinRegistry.tsrow. The workflows spec, the feature map andtest/gui_user/features.jsonname the new paths.Backwards compatibility
Compatible: only module paths inside the dashboard bundle change; no route, API, setting, catalog key or rendered output changes.
Removes nothing: every moved module keeps its exports, and the one dropped re-export (
groupByPhase/latestBudgetfromWorkflowsPage.tsx) had a single reader,website/src/test/workflowRunModel.test.ts(formerlyWorkflowsPage.test.ts), which now importscomponents/workflows/runModeldirectly.Tests
website/src/apps/workflows/workflowsBoundary.test.ts: fails on main (34 modules outside the app import it), passes here.WorkflowsPage.switchLabels.test.tsxcarries the page case split out ofWorkflowsPluralCounts.test.tsx.Proof: not provable -- frontend test (prove.py runs Python only). The boundary test was run against an
origin/maintree and failed with the 34 core importers listed.Manual verification
N/A: a path-only move with no rendered delta;
tsc -p tsconfig.app.json, eslint,npm run i18n:check,npm run buildand every vitest file that imports a changed module (341 files, 4675 tests) pass locally.Screenshots / video
Why no screenshot: files move between directories with identical contents, so nothing renders differently.
Related Issues
Part of #26967
Open PRs #25466 and #25471 add new views under
website/src/apps/workflows/kas/; if core imports them, the boundary test asks forcomponents/workflows/instead.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)