Repository navigation
cockpit v3: lenses (lineage, timeline, money) and the factory tree (W7, W9) - #216
Merged
Merged
Conversation
…7, W9)
W7. Below a node's header its children show in one lens, kept in the
address (?lens=; `v` steps to the next): Map, List, Lineage, Timeline and
Money. The bar offers a lens only when it has something to show: Lineage in
the product tree, Timeline once the server drew a lane, Money when two or
more children have a cost or a budget, neither on a level grouped under
parents. LineageLens reads top to bottom (each ancestor with its one line, a
need's evidence, what approved a feature, the node, the counts per level
below that open each level, the results); a node with nothing below folds it
into one line, and the phone's Lineage button opens it as a sheet
(?peek=lineage&at=). TimelineLens draws one lane per child as boxes: work
solid (blue, green once done), waits hatched, amber only when a person is
the cause, the stretch since the viewer's last look shaded, ticks on round
local times, nothing drawn between lanes and no SVG. MoneyLens lists cost
against budget, most first, the total and what no child holds. The live
source reads GET …/n/{ref}/lineage|timeline|money and GET …/levels; the
sample computes the same shapes.
W9. The factory tree: Product | Factory in the v3 top bar (the factory's
asks counted) in place of v2's places; Health lists the alarms the server
closed with their causes and the real ask; Environments shows the base env
(commit, health, follows, sign-in, holds, Try it in the app); Definition
shows both trees' levels as the definition names them and offers Rename
levels (r): the product's level names and plurals, previewed through the
definition's preview, saved as a version on the version read, Undo by
re-pinning the version before (the Team panel's Undo, now shared). A verb
key the page offers wins over the shell's single keys, so r renames on
Definition and talks everywhere else.
Server: rename is offered on the Definition area only (it was offered on
every factory item); the Environments area carries the base env as the
product root does. The lens fixture gains the factory's levels, a
project's timeline, the root's money and a factory lineage.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Timeline: a long lane title is clipped with an ellipsis inside its 168px column at desktop width (it ran into the track). - Rename levels on factories stored before: `upgrade()` moves a stored `structure.verbs.item` `rename` to `structure.verbs.area`, so Definition offers it again; the Definition page carries `levels: true` and shows the levels from it (to every viewer), not from the verb. - The base env carries `area: "fx:environments"`; the env sheet's "Factory › Environments" opens that area (`ref` stays the setup project). - The timeline probe every page makes reads the spans once per projection (memoized on the tree, dropped with it) and never refetches on focus. - Rename: a name typed back as it was brings no plural (an irregular one stays); the panel closes before the pages refresh, and its preview is keyed outside the node keys, so Apply never re-posts a stale preview. - Lineage: the fold names the first ancestor below the root (no level key in render code); open changes read by their short sha or #number, as links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
❌ UI Snapshot doesn't match the committed baseline. If this UI change is intentional, update the baseline — each path renders in the same pinned image, so the result matches this gate:
Diff PNGs ( |
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Closes # (cockpit v3 plan items W7 and W9;
notes/factory-v3/final/plan.md, milestone 2 "Steer at the node")Summary
Cockpit v3 gets its other lenses and the factory tree. Below a node's header its children now show in one of five lenses: Map, List, Lineage, Timeline or Money. The bar offers only lenses that have something to show, and none of them draws a line between nodes. The factory tree gets a Product | Factory switch in the top bar and real content in its areas: Health lists the alarms the server closed, Environments shows the base env, and Definition shows the levels and can rename them (previewed, saved as a version, with Undo). Everything stays behind
?cockpit=v3; v1 and v2 are unchanged.ELI5: "how did the assistant feature go today?" is now one click (Timeline). There is one row per project. Blue means it worked, hatched means it waited, and amber means it waited on you. The stretch since you last looked is shaded. "Where did T-16 come from?" is Lineage: product → need (your ask, no user evidence) → feature (approved by C-11) → project → this task, then what is below it and what landed.
Plan bullets → what this PR does
W7. Lenses (
web/src/components/factory/v3/lenses/)LineageLens(GET …/n/{ref}/lineage):?peek=lineage&at=<ref>).TimelineLens(GET …/n/{ref}/timeline):last_lookto now. The legend lists only the kinds present.MoneyLens(GET …/n/{ref}/money): each child's cost against its budget, most first, as one bar per row, with $/h burn where present. Then the total (of the node's budget) and "$x more was spent here … that no child holds" (rest).lensModel.useLensChoice):?lens=timeline, replaced in place so Back stays per node).vsteps to the next lens. A lens the view does not offer falls back to Map or List. Overlays show only with Map or List.…/lineage|timeline|money(S8, on staging) andGET …/levels. The sample source computes the same shapes (fixture/sampleLenses.ts, with the prototype's spans for the assistant's projects and tasks).Lenses.test.tsxopens every lens every sample page offers, at desktop and phone width, and asserts nosvg line/path/polyline/polygon, no SVG at all inside a lens, and no empty cell.nodeWire.server.test.tsxrenders the server's own timeline, money and lineage through the live source, with the same assertion.levelsRule.test.tsx's sheet sweep adds the lineage sheet.W9. Factory tree (
v3/factory/FactoryAreas.tsx,shell/FactoryTabs.tsx,verbs/RenamePanel.tsx)TreeSwitch) in the v3 top bar, with the asks waiting in the factory tree (thefxpage'sneeds.open). It takes the place of v2's places under v3 only. The current tree is the page node's root, read from the page's own query.ClosedAlarmRows).r, from Definition):POST …/definition/preview, thenPUT …/definitionwithbase_version(the versionGET …/levelsread) and note "Rename levels". Undo re-pins the version before, only while the version it made is in force. That Undo is the Team panel's, now shared asuseVersionUndo.rrenames on Definition and still talks in the chat everywhere else; every other key behaves as before.Server (small, for W9)
renameis offered on the Definition area only. It was instructure.verbs.item, so every factory item (C-17, base-env, D-48, members) showed a "Rename" button that did nothing. Nowstructure.verbs.arealists it,_verb_appliesrestricts it tofx:definition, and the label reads "Rename levels".envas the product root.fx:environmentsandfx:definition.Deviations
renameverb moved fromitemtoarea(defaults and golden updated). A stored definition that listsrenameunderitemhas it moved toareaon read (definition_blocks.upgrade), so it still offers Rename levels on Definition. The Definition page carrieslevels: trueand shows the levels from that (to every viewer), not from the verb.fx:environments(the server's ref). The sample-onlyenv:baseandfx:levelsitems are gone. Closed alarms' causes no longer repeat the real ask.g f/g rchords are not added: the Product | Factory switch and ⌘K cover them.Review fixes (second commit)
max-w-full). Measured in the rebuilt Storybook: "Fix live search on sample-main" is 168px wide and ends at x=206, before the track at 218. At 390 it stays a row.upgrade()moves a storedstructure.verbs.itemrenametostructure.verbs.area(tests intest_levels.pyandtest_nodes.py).area: "fx:environments", and the env sheet's "Factory › Environments" opens that area.refstays the setup project. New test: clicking it rendersv3-base-env.node_lenses.projection_spans). New API test: four reads across pages hit the store once, and an invalidation reads again.refetchOnWindowFocus: falseon the probe.1 open: a097437).Test Plan
uv run --frozen pytest -q -n 8 tests/server/factory tests/examples/test_factory_sample_tokens.py tests/runner/test_factory_node_tool.py: 4489 passed, after rebasing on cockpit v3: threads per node and structural verbs with preview, apply and Undo (S11, S12) #215. After the review fixes:tests/server/factoryplus the sample-token scan, 4483 passed (the 300 ms tests included), andtests/runner/test_factory_node_tool.py, 9 passed. This includes the 300 ms performance tests and FORBIDDEN_SAMPLE_TOKENS.test_nodes.py::test_the_environments_area_shows_the_base_envand::test_levels_are_renamed_from_the_definition_area_only. The two wire fixtures were regenerated (OMNIGENT_UPDATE_NODE_PAGES=1).tsc -bclean;oxlint --deny-warningsonsrc/components/factory src/pages/factory src/libclean; prettier clean.vitest run src/components/factory src/pages/factory src/lib: 235 files, 4166 tests, all passed (4169 after the review fixes). The fullnpm testafter the review fixes: 550 files, 10527 passed.lenses/Lenses.test.tsx(12):vsteps through them.factory/FactoryTree.test.tsx(10): Health rows, causes and real ask; the Environments block; the root has no env block; Rules; the Definition levels andr; only Definition offers rename; rename preview → apply → Undo on the sample; duplicate names refused; args → definition changes; the live path (definition preview, thenPUT …/definitionwithbase_version14, then the toast).nodeWire.server.test.tsx(+2): the server's timeline, money and lineage through the live source; Environments and Definition on the server's pages.CockpitV3.test.tsx(+3): Product | Factory with the factory's count and no v2 tabs; Health is the Factory's tree;rrenames on Definition and opens the chat elsewhere.wt/v3-tmp/v3-m2-lenses/shots/.How to try it: in Storybook, open
Factory/Cockpit v3/Lenses(AgentAssistantTimeline, AgentAssistantMoney, T16Lineage, the phone and dark variants, T16LineageSheetPhoneDark) andFactory/Cockpit v3/Factory tree(Areas, RulesC17C18, HealthClosedAlarms, Environments, Team, DefinitionLevels, RenameLevels, RenamedEverywhere).Factory/Cockpit v3/Shell› V3FactoryTree, V3FactoryHealthDark and V3ServerTimeline render the server's own fixtures in the shell. On a live factory with?cockpit=v3: open a feature and pressv, or pick Timeline. Click Factory in the top bar, then Definition, then pressr.Demo
Captures beside the prototype's shots (timeline vs shot 05, lineage vs 12, the factory tree vs 16, Health vs 17), each with what matches and what differs: https://claude.ai/artifact/X6xUy1cdcye6Jto7qgJvyq (private; ask Luka for access). Screenshots are not committed (repo rule), and the CLI cannot upload attachments. The 20 captures are in
wt/v3-tmp/v3-m2-lenses/shots/.Type of change
Test coverage
Coverage notes
Manual: Storybook stories checked in the browser at 1440 and 390, light and dark. The timeline matches the prototype's shot 05, the lineage matches shot 12, and the Health area matches shot 17. Captured with no horizontal overflow; the shell stories ran on the server's own fixtures.
Changelog
Cockpit v3: Lineage, Timeline and Money lenses on every node, and the factory tree (Health, Environments, Definition with Rename levels) behind Product | Factory
🤖 Generated with Claude Code