Skip to content

web: slim header — drop Token chip, icon-only Export/BOM - #37

Merged
Code4me2 merged 1 commit into
mainfrom
cursor/slim-header-export-bom-f5ef
Aug 31, 2026
Merged

Code4me2 merged 1 commit into
mainfrom
cursor/slim-header-export-bom-f5ef

Conversation

@Code4me2

@Code4me2 Code4me2 commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

The 44px header is identity → pin → quiet Export/BOM → build state. The pin is the one dominant element again.

Velvet re-measures at 1280×800

  • Pin is readable in the 44px bar: the decorative Token chip is gone, so it no longer crowds the ref. The real token is still the URL fragment / sessionStorage (§2.2). The NoToken full-page screen is unchanged.
  • Export and BOM stay two distinct, visible, clickable header controls ([data-chrome-export], [data-chrome-bom]). They are icon-only (existing Button icon / iconLabel); titles remain title / aria-label. No overflow, menu, or extra click in front of them.
  • Both still send the workspace pin (artifact_ref / pinMode from useExportActions). They do not resolve "current" at click time. Opening them still reaches the same Export format dialog and Sourcing dialog.
  • Inspector Export (history / drawings / docs) and Sourcing tabs stay. No third egress surface. No new routes.

Gate (this revision)

pnpm --dir web test — 480 passed. typecheck green. lint green. G4/G5 untouched.

This VM cannot stand up heph serve --web (no packaged sidecar). The signed-in DOM is locked by unit tests (no [data-token-state]; both chrome selectors stay sibling <button>s under [data-part-chrome] and still pass pinned / pinMode). A token-faithful 1280×800 layout preview of that header measured header 1280×44, pin 244–572, Export 39, BOM 39, tokenChip absent, buttons two. NoToken was checked on the real Vite app.

1280×800 header: pin dominant, no Token chip, icon-only Export/BOM
Real Vite app: NoToken full-page screen still ships

Web-only. Does not touch import (#36), CAM UI, viewport well / rail Sign-in (#32), composer (#33), DFM inspector, or stage / inspector tab lists.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

The 44px bar is identity → pin → quiet Export/BOM → build state. The
decorative Token chip is gone (the real token stays in the fragment /
sessionStorage; NoToken is still the unsigned-in screen). Export and BOM
remain two distinct pin-bound header controls, now icon-only so the pin
dominates.

Co-authored-by: Vel <Code4me2@users.noreply.github.com>
@Code4me2
Code4me2 marked this pull request as ready for review August 31, 2026 20:58
@Code4me2

Copy link
Copy Markdown
Member Author

Adversarial review — do not merge from this comment

Reviewed df9c05f off main f318dbd. Diff is five web/ files (Header, PartChrome, chrome unit/e2e, operator-chrome). No engine, CLI, import, G4 viewport/stream specs, or G5 pin-store tests.

Contract vs. the tree

Intended Finding
Decorative Token chip gone (data-token-state dropped) Holds. Header.tsx no longer imports Chip or writes data-token-state. copy.header.token is unused at the call site. e2e asserts header [data-token-state] count 0.
NoToken full-page screen stays; real token is the fragment Holds. App.tsx still if (workspaceToken() === null) return <NoToken />. NoToken.tsx / web/src/api/token.ts are byte-identical to main.
Two visible icon-only header buttons; no overflow; same selectors; no extra click Holds. [data-chrome-export] and [data-chrome-bom] remain on two sibling <Button>s under [data-part-chrome]. Existing icon + iconLabel path (aria-label + title). No data-chrome-more / overflow host. onClick opens the same export / sourcing popovers.
Pin-bound artifact_ref Holds. useExportActions() still supplies pinned / pinMode; ExportChrome still sets artifactRef: pinned and refuses no_pin. SourcingPanel still reads useWorkspace(s => s.artifact_ref). Chrome does not resolve “current” at click time.
Inspector Export + Sourcing stay; no third egress Holds. INSPECTOR_TABS still contains both. Chrome does not inspector_tab: "sourcing". The inspector door inside ExportChrome is the existing dialog→tab link, not a third header control.
chrome.spec.ts still passes Holds on CI. Gate G4 (pnpm --dir web test:e2e in render goldens (pinned image)) is green on this SHA. That suite opens the viewport tab, asserts both chrome selectors toBeVisible(), clicks them without a prelude, and checks pin / sourcing facts. web (node) and lint + type are also green.

BLOCK list

  • overflow hides chrome selectors — no overflow menu. CSS overflow: hidden on .subject is pre-existing; icon-only reduces clip risk. G4 e2e (1600×1000) saw both selectors.
  • Export/BOM vanish — selectors still on real <button>s; G4 clicked them.
  • pin unbound — wiring unchanged; e2e still matches workspace.artifact_ref to the server build ref.
  • NoToken removed — not touched.
  • G4/G5 weakened — chrome spec gained an assertion; G4.5–G4.11 / G5.3 / G5.6 files are untouched and G4 e2e passed.
  • engine/import collision — no overlap with engine: heph import add (STEP/mesh into imports/) #36 (engine/CLI only, same base).
  • data-chrome-* renamed — same names, same empty-string attributes via dataProps.

Residuals (not BLOCK)

  1. INTERFACE.md §4.1 still draws build state \| token and “identity → pin → build state → token”. The code comment dropped token; the spec did not. Fine for a web-only polish, but the ASCII art is now stale.
  2. copy.header.token is dead copy. Harmless.
  3. The new pin-binding unit test is a source-string grep (pinned={pinned}). The lock that matters is chrome.spec.ts, which still runs for real.
  4. [data-part-chrome] still has min-width: 0 and no flex-shrink: 0. A pathological identity + held-pin + “Follow current” row could still clip chrome. Pre-existing; this PR makes that less likely.

MERGE — header polish matches the contract: chip gone, NoToken/G4/G5/import untouched, both chrome selectors still pin-bound and directly clickable.

@Code4me2
Code4me2 merged commit 89c98f4 into main Aug 31, 2026
18 checks passed
Code4me2 added a commit that referenced this pull request Aug 31, 2026
#37 removed the chip; the spec ASCII and unused copy.header.token now match.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Vel <Code4me2@users.noreply.github.com>
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