Skip to content

FIX-1649: rename app-lab to shift-manager, add day/night boot shift and DevTeam profile - #2588

Merged
jhoffner merged 6 commits into
mainfrom
feat/FIX-1649-shift-manager
Oct 1, 2026
Merged

jhoffner merged 6 commits into
mainfrom
feat/FIX-1649-shift-manager

Conversation

@jhoffner

@jhoffner jhoffner commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  1. Boot shift. --shift day|night, or the SHIFT_MANAGER_SHIFT environment 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 under profiles/ (day.json, night.json). This lives in the lab only: no framework theme system, and no toggle on the page.
  2. Rename. 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.
  3. DevTeam team profile. The DevForce lab's served config moves to labs/shift-manager/teams/devteam/fsdev.config.mts and opens with --team devteam. --config <path> still takes any Lab. The team's tree and the checks behind it stay in goals/devforce-lab/, so they behave exactly as before.
  4. labs/README.md. Conductor is described as this repo's host for harness-manager and 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 --team or --config twice 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(), and pagesWithMetas, which now writes both the devtool address and the forced scheme into the served copy of index.html.
  • labs/shift-manager/src/lib/color-scheme.ts: bootColorScheme sets 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. With bootColorScheme patched to ignore the shift and follow the OS:

× night is dark while the OS prefers light ...   expected false to be true
× day is light while the OS prefers dark ...     expected true to be false
Tests  2 failed | 5 passed (7)

Unpatched: 7/7 pass.

Start script, before it was implemented: TypeError [ERR_PARSE_ARGS_UNKNOWN_OPTION]: Unknown option '--shift'. After: the served page carries dark for --shift night, light for --shift day, dark for SHIFT_MANAGER_SHIFT=night, light when --shift day and env night are both set, and no meta when neither is. --shift dusk is refused.

Real Chromium against the built pages (the OS setting is flipped after boot):

--shift night, OS light              dark at boot: true  | after OS flips: true  | body bg: rgb(21, 20, 15)
--shift day, OS dark                 dark at boot: false | after OS flips: false | body bg: rgb(240, 236, 225)
SHIFT_MANAGER_SHIFT=night, OS light  dark at boot: true  | after OS flips: true  | body bg: rgb(21, 20, 15)
unset, OS dark                       dark at boot: true  | after OS flips: false | body bg: rgb(240, 236, 225)
unset, OS light                      dark at boot: false | after OS flips: true  | body bg: rgb(21, 20, 15)

DevTeam: --team devteam serves a bearer-authenticated Lab (401 without the bearer, 200 with it, one session or more). --team nightwatch is refused with Known teams: devteam. --team plus --config is refused. These tests were red first (the --team option didn't exist yet).

Checks run
  • pnpm typecheck, pnpm knip:ci and pnpm lint all pass. The process-guard scripts (spec folder, changeset refs, publish set, NUL bytes) pass locally.
  • @flow-state-dev/shift-manager tests: 123 passed, 1 skipped (the skip was already on main). @flow-state-dev/design-system tests: 11 passed.
  • Goals (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-file and it-ships-an-artifact-a-person-can-open, which need a signed-in Claude Agent SDK. This change doesn't touch their path.
  • docs-editor reviewed the changed READMEs (REVISE); its findings are applied in 9704b94.
Engineering calls and leftovers
  • Name casing: prose and UI use "Shift Manager", and identifiers and paths use shift-manager.
  • No changeset: @flow-state-dev/shift-manager and @flow-state-dev/design-system are private. The published packages touched (devtool, harness-manager) changed in comments only.
  • goals/devforce-lab/ keeps its name, and DEVFORCE_LAB_HARNESS / DEVFORCE_LAB_STEP_MS keep 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 trip manager-queue-lab's frozen-subtree fence. Only the served config moved.
  • Leftover app-lab hits outside specs and CHANGELOGs: four verdict-log rows that quote the branch names fix-1662-app-lab-shell and fix-1688-app-lab-skin. Branch names are references, so they stay as written.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq

claude added 5 commits October 1, 2026 17:01
--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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Oct 1, 2026 5:20pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 1, 2026 5:20pm UTC
flow-state-dev-ui Ignored Ignored Preview Oct 1, 2026 5:20pm UTC

Request Review

@linear-code

linear-code Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

FIX-1649

FIX-1706

@cursor

cursor Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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)

jhoffner commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

Second-look + architecture review (read-only; no edits made)

Scope: I read the new logic (labs/shift-manager/bin/start.mts, src/lib/color-scheme.ts, profiles/*.json, teams/devteam/fsdev.config.mts) and skimmed the rename. I did not re-run the test suite or goals. The rename itself looks mechanical, and my grep found no stray app-lab hits outside specs/CHANGELOGs. Of the files that mention it, only two goal.md files turned up, which is worth a glance at the exact wording.

Overall: the approach is sound. The shift is injected into the served copy of index.html through the mechanism the devtool address already uses, and it adds no framework surface or page toggle. Nothing here blocks the merge. Findings below, ranked.

1. The lab imports goal code, including a goal fixture read at runtime (worth a decision)

teams/devteam/fsdev.config.mts imports 8 modules from goals/devforce-lab/lab/ via ../../../../ paths. It also does readFileSync(.../goals/devforce-lab/it-waits-for-a-person-before-it-files/fixtures/input.json) to get ASK_FEATURE. The PR description flags the import coupling. The fixture read is a stronger form of it. A shipped lab profile now depends on a goal's test fixture file existing and keeping its shape, and the comment says it must not be spelled in the lab file because a goal check refuses that. So a goal-hygiene rule is shaping production-lab code.

  • Opportunity (this PR is the moment, since the config is already being moved): a small labs/shift-manager/teams/devteam/ seam (or a goals/devforce-lab/lab/ export such as askFeature) that exposes the ask feature as a module export rather than a path into another goal's fixtures/. That makes the fixture rename-safe and keeps the dependency in one direction.
  • If you want the minimum: leave as is, and add a test asserting ASK_FEATURE parses, so a fixture change fails loudly here and not at --team devteam boot. I don't see one in the diff.

2. profiles/day.json and night.json are indirection for a two-value enum

shiftScheme() does readdirSync + JSON.parse + a shape check to turn day|night into light|dark. That is about 8 lines of runtime validation for two constants, and the "known shifts" list is derived from the directory listing. The PR says the owner asked for profile files, so I'm not asking for removal. But PROFILES is only worth its cost if a shift will carry more than colorScheme (the design-system tokens, say). If it never will, const SHIFTS = { day: "light", night: "dark" } is the leaner shape. Suggest the implementer note in the README which of those two it is, so the next reader knows whether to add fields to the JSON or not.

3. Two copies of the meta-name contract

SCHEME_META = "shift-manager-color-scheme" is declared in both bin/start.mts and src/lib/color-scheme.ts, and the devtool meta (DEVTOOL_META) already had the same split. A rename of either side silently stops the shift from applying, and the page falls back to the OS look with no error. The unit test covers readServedColorScheme given a meta and the start test covers the served HTML, so the pair is covered end to end. A shared constant would not cross the node/browser build boundary cheaply, so I'd leave it. I'd just make sure start.test.ts asserts the literal meta name, so a one-sided rename fails there.

4. Nits

  • configPath() computes known teams by scanning teams/ for fsdev.config.mts. The same function builds the "one team per process" error from both flags. That's fine, but parseArgs multiple: true on --config is a behaviour change: before, a repeated --config presumably was a parse error or last-wins. Worth one line in the README or the commit that it's now refused.
  • bootColorScheme(forced) returning a no-op unsubscribe is fine and consistent with followColorScheme.
  • The "one team per process" refusal is the right call to keep. I agree with the recommendation in "What's asked of you", and no need to build the N-process launcher yet.

Alternative approaches considered

  • Cookie/localStorage-driven shift: rejected, as the PR also does. A forced boot look from the launcher belongs on the server side.
  • Passing the scheme as a query param: rejected. It would allow per-tab drift and needs a second source of truth. Meta injection is better.

Nothing above needs to be fixed before merge. Item 1 is the only one I'd want a human to decide on (add the seam now, or accept the coupling and add the fixture-shape test).


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Automation: Code Snob

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts is small, testable, and matches the spec (no in-app toggle; optional forced look at start). Pulling in next-themes from kitchen-sink would be heavier and wrong UX.
  • --team + teams/<name>/fsdev.config.mts mirrors 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-lab is a reasonable split for “demo you can pnpm start --team devteam” vs “checks that prove the tree.”

Where it may have gone slightly past “minimum”

  1. profiles/*.json for day/night — Each file only carries colorScheme. That buys a file-based extension point, but today it also means readdirSync, JSON.parse, and validation for a closed pair. A const SHIFTS = { day: "light", night: "dark" } in start.mts (still honoring SHIFT_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.

  2. Meta injection via full dist/ copy — Forced shift reuses pagesWithMetas, 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 on start. Longer term, if @flow-state-dev/node ever exposes a composable HTML transform (today only devtool config injection uses one internally), injecting <meta> at serve time would avoid duplicating dist/ on disk. Not a merge blocker; follow-up if dist/ grows.

  3. teams/devteam/fsdev.config.mts coupling — Four-level relative imports into goals/devforce-lab/lab/* plus a second readDeclaredRoster(LAB_TREE) before openLab() (which loads the roster again) makes cold start heavier and brittle to goal folder moves. A thinner profile (export default (await createDevTeamServerProfile()).state exported 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.

  4. Meta name drift — shift-manager-color-scheme / shift-manager-devtool are duplicated across bin/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 selectHarness when 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).

Open in Web View Automation 

Sent by Cursor Automation: Review For Best Approach

Comment thread labs/shift-manager/bin/start.mts Resolved
Comment thread labs/shift-manager/bin/start.mts Resolved
@jhoffner
jhoffner merged commit 0c49e70 into main Oct 1, 2026
13 checks passed
jhoffner pushed a commit that referenced this pull request Oct 1, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants