Repository navigation
FIX-1649: rename app-lab to shift-manager, add day/night boot shift and DevTeam profile - #2588
Conversation
--shift day|night, or SHIFT_MANAGER_SHIFT, picks a profile under profiles/ and forces the .dark class off or on at boot. Unset keeps following prefers-color-scheme. The scheme reaches the page as a meta tag in the same served copy the devtool address already uses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
labs/app-lab -> labs/shift-manager (@flow-state-dev/shift-manager), goals/app-lab -> goals/shift-manager, design-system app-lab.css -> shift-manager.css, and every reference, meta name, temp prefix and UI string with them. Retained specs and branch names quoted in verdict logs are left as written. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
The DevForce lab's served config moves to teams/devteam/fsdev.config.mts in the shift-manager lab and opens with --team devteam (--config still takes any path). One team per process; a second --team or --config is refused. The tree and its checks stay in goals/devforce-lab, and the shift-manager goals and tests now name the served team DevTeam. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_476e12eb-ac4f-42f7-a5c4-73ca84f433e1) |
Second-look + architecture review (read-only; no edits made)Scope: I read the new logic ( Overall: the approach is sound. The shift is injected into the served copy of 1. The lab imports goal code, including a goal fixture read at runtime (worth a decision)
2.
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
There was a problem hiding this comment.
Code Snob — already tight. No POC.
Read: labs/shift-manager/bin/start.mts (configPath, shiftScheme, pagesWithMetas), labs/shift-manager/src/lib/color-scheme.ts, labs/shift-manager/src/lib/connection.ts (readDevtoolUrl), labs/shift-manager/src/main.tsx, labs/shift-manager/profiles/day.json, labs/shift-manager/profiles/night.json, labs/shift-manager/teams/devteam/fsdev.config.mts, labs/shift-manager/test/color-scheme.test.ts, labs/shift-manager/test/start.test.ts. The look-goal runner and goals/lib/colour.mts are the rename.
pagesWithMetas is already the one writer for the devtool address and the forced scheme. bootColorScheme is the three-line branch the tests call; inlining it into main.tsx copies that branch across the forced and unforced cases.
shiftScheme and configPath both list a directory and refuse an unknown name. The listings are not the same (a *.json stem versus a directory that contains fsdev.config.mts), and the refusal strings are the ones start.test.ts matches. A shared helper has to take both predicates and both messages, which is longer than the two includes checks.
SCHEME_META and DEVTOOL_META are one literal on each side of the page. A shared module adds a file and imports to delete those declarations. The readers also accept different values (light/dark versus an http(s) URL), so they do not fold into one function.
The two profile files are the recorded shape of a shift. Replacing them with { day: "light", night: "dark" } deletes that. The DevTeam config is the old file with longer relative imports; a barrel in goals/devforce-lab would be a new module, not a subtraction. The fixture read was already there.
Head 6f3567c30e1687f468acb78459f274e7df191ba7.
Sent by Cursor Automation: Code Snob
There was a problem hiding this comment.
Simplify review
Most of this PR is the rename (app-lab → shift-manager, design-system CSS export, goals paths) and reads as mechanical churn done carefully. The three product moves on top — boot shift, --team devteam, and moving the served DevForce config into teams/ — hang together: shift is chrome-only, team profiles are a convenience over --config, and the meta-tag + scratch-copy path reuses the same mechanism the lab already had for the sidecar devtool URL.
Where the approach is about right
color-scheme.tsis small, testable, and matches the spec (no in-app toggle; optional forced look at start). Pulling innext-themesfrom kitchen-sink would be heavier and wrong UX.--team+teams/<name>/fsdev.config.mtsmirrors how people already think about opening a lab, and directory discovery is justified if more profiles land.- DevTeam config living under the lab package while the tree and proofs stay in
goals/devforce-labis a reasonable split for “demo you canpnpm start --team devteam” vs “checks that prove the tree.”
Where it may have gone slightly past “minimum”
-
profiles/*.jsonfor day/night — Each file only carriescolorScheme. That buys a file-based extension point, but today it also meansreaddirSync,JSON.parse, and validation for a closed pair. Aconst SHIFTS = { day: "light", night: "dark" }instart.mts(still honoringSHIFT_MANAGER_SHIFT) would be shorter and easier to grep; keep JSON only if you expect non-color fields on a shift soon (density, accent pack, etc.). I’m not sure you need the files yet — worth a quick product call. -
Meta injection via full
dist/copy — Forced shift reusespagesWithMetas, which copies the whole build whenever devtool meta or scheme meta is present (default path with bundled devtool). That’s consistent with pre-rename App Lab, but it’s the main ongoing cost onstart. Longer term, if@flow-state-dev/nodeever exposes a composable HTML transform (today only devtool config injection uses one internally), injecting<meta>at serve time would avoid duplicatingdist/on disk. Not a merge blocker; follow-up ifdist/grows. -
teams/devteam/fsdev.config.mtscoupling — Four-level relative imports intogoals/devforce-lab/lab/*plus a secondreadDeclaredRoster(LAB_TREE)beforeopenLab()(which loads the roster again) makes cold start heavier and brittle to goal folder moves. A thinner profile (export default (await createDevTeamServerProfile()).stateexported from the goal host) would centralize the wiring and drop the duplicate roster read. Optional hardening; the current shape is acceptable for a single demo team. -
Meta name drift —
shift-manager-color-scheme/shift-manager-devtoolare duplicated acrossbin/start.mts,color-scheme.ts,connection.ts, and tests. Low risk today; a tiny shared constants module would prevent a one-sided rename later.
Skipped (larger than this PR)
- Lazy/seeding split for DevTeam boot (inventory + ask before listen) — real latency win but product-shaped.
- Dynamic import for Claude harness in
selectHarnesswhen stub is default — nice dev perf, belongs in devforce-lab host.
Verdict: Direction looks sound; rename noise is unavoidable. I’d merge as-is and treat the JSON shift profiles and devteam import/roster nits as small follow-ups unless you’re still editing this branch. No changeset concern (private lab packages).
Sent by Cursor Automation: Review For Best Approach
Post-merge amendment of the retained closure spec (original review #2426): - names, paths and commands follow the Shift Manager rename (#2588) - leg c sweeps the promised set: message, reasoning, tool, code block and ask cards, plus the devtool page (#2532) - a4 targets eng.coder's running task session (FIX-1690: #2538/#2544/#2565) - Part 4's Inbox reply is graded on FIX-1690's test seat (#2525) - a2 runs without --devtool; Shift Manager serves its own (#2531) Recorded in DECISIONS -> How it got here, and a new EVOLUTION.md. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq


The problem
The Workforce lab shell was called App Lab, the software team you open in it was called DevForce, and the labs index still described Conductor as a product of its own. The owner has now named the shell Shift Manager (day shift is light, night shift is dark), named the software team DevTeam (a team profile you load into it), and retired Conductor as a separate product name. Before this change you also couldn't start the shell on a fixed look: it always followed the OS setting.
What this does
Four commits, in the order the owner set, plus one docs-review pass:
--shift day|night, or theSHIFT_MANAGER_SHIFTenvironment variable, starts the shell on light or dark and holds that look whatever the OS setting says. The flag wins if both are set. Leave both unset and the page follows the OS, as before. Each shift is a small file underprofiles/(day.json,night.json). This lives in the lab only: no framework theme system, and no toggle on the page.labs/app-lab→labs/shift-manager(@flow-state-dev/shift-manager, private),goals/app-lab→goals/shift-manager,design-system/app-lab.css→shift-manager.css. Every reference, UI string, README, meta name and temp prefix follows, and the lockfile is regenerated. Retained specs are left as written.labs/shift-manager/teams/devteam/fsdev.config.mtsand opens with--team devteam.--config <path>still takes any Lab. The team's tree and the checks behind it stay ingoals/devforce-lab/, so they behave exactly as before.harness-managerand is no longer named as a product. Shift Manager is described as the app you run a team through.What's asked of you
Nothing beyond review. One engineering call is made here: passing
--teamor--configtwice is refused with "one team per process". That keeps the owner's open question (one process holding several teams, or one process per team) open. It's one flag check in the lab's start script, so it's cheap to change once that's decided.Parts worth reviewing closely
labs/shift-manager/bin/start.mts:shiftScheme(),configPath(), andpagesWithMetas, which now writes both the devtool address and the forced scheme into the served copy ofindex.html.labs/shift-manager/src/lib/color-scheme.ts:bootColorSchemesets the class once and adds no OS listener when a shift is forced.labs/shift-manager/teams/devteam/fsdev.config.mts: the moved config, which now imports the DevForce tree through../../../../goals/devforce-lab/lab/. The lab depends on goal code here. It did before too, through the README's--config goals/...path, but now it shows up as an import.Linear: epic FIX-1649 (no dedicated issue). Owner decision: agent-mailbox #29. This merges.
Verification: the boot shift going from red to green
Unit, with the flag ignored as the control. In
test/color-scheme.test.ts, each forced case runs against the opposite OS setting. WithbootColorSchemepatched to ignore the shift and follow the OS:Unpatched: 7/7 pass.
Start script, before it was implemented:
TypeError [ERR_PARSE_ARGS_UNKNOWN_OPTION]: Unknown option '--shift'. After: the served page carriesdarkfor--shift night,lightfor--shift day,darkforSHIFT_MANAGER_SHIFT=night,lightwhen--shift dayand envnightare both set, and no meta when neither is.--shift duskis refused.Real Chromium against the built pages (the OS setting is flipped after boot):
DevTeam:
--team devteamserves a bearer-authenticated Lab (401 without the bearer, 200 with it, one session or more).--team nightwatchis refused withKnown teams: devteam.--teamplus--configis refused. These tests were red first (the--teamoption didn't exist yet).Checks run
pnpm typecheck,pnpm knip:ciandpnpm lintall pass. The process-guard scripts (spec folder, changeset refs, publish set, NUL bytes) pass locally.@flow-state-dev/shift-managertests: 123 passed, 1 skipped (the skip was already on main).@flow-state-dev/design-systemtests: 11 passed.PLAYWRIGHT_BROWSERS_PATH=/opt/pw-browsers), all PASS:shift-manager/it-opens-a-lab,it-sends-a-turn-into-a-seat-session,it-shows-and-stops-a-task-run,it-takes-its-look-from-the-design-system,devforce-lab/it-wakes-the-seat-a-file-declared,it-keeps-its-rows-on-the-channels-board,it-waits-for-a-person-before-it-files. Not run:it-commits-from-the-seats-own-fileandit-ships-an-artifact-a-person-can-open, which need a signed-in Claude Agent SDK. This change doesn't touch their path.docs-editorreviewed the changed READMEs (REVISE); its findings are applied in 9704b94.Engineering calls and leftovers
shift-manager.@flow-state-dev/shift-managerand@flow-state-dev/design-systemare private. The published packages touched (devtool,harness-manager) changed in comments only.goals/devforce-lab/keeps its name, andDEVFORCE_LAB_HARNESS/DEVFORCE_LAB_STEP_MSkeep theirs. That folder is evidence for the seat-to-coding-run join, not the shell's team. Renaming it would change board ids and user ids in the harness-manager snapshots, and it would tripmanager-queue-lab's frozen-subtree fence. Only the served config moved.app-labhits outside specs and CHANGELOGs: four verdict-log rows that quote the branch namesfix-1662-app-lab-shellandfix-1688-app-lab-skin. Branch names are references, so they stay as written.🤖 Generated with Claude Code
https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq