Files
museion/docs/devlog/20261104-issue156-mentor-pane-chrome-editorial-voice_log.md
AlexKucera d6c4712aaa
CI / ci (push) Canceled after 0s
feat(mentor): editorial pane chrome (#156)
Wayfinder map #153, build slice 2 of the #154 contract: the pane's
chrome joins the transcript's editorial voice (#155).

Header per .pane-head — serif-15/600 "Mentor", engine status, mono-10
session chip; ready is the semantic green dot (DesignTokens.readyGreen,
the palette's sole exception) + lowercase mono "ready", base version in
the tooltip, the drift note kept visible. The segmented Pass 1 | Pass 2
| Chat picker is dead (settled #4): PassBarView always carries and owns
the compact text-tab selector (2pt accent underline) over a PASS N ·
STATE status line, the cost line, and the actions as MonoButton —
accent solid / surface+border / accent outline, the danger voice.
Fix-cards row is the ruled plain mono link; crash, missing-engine, and
starting states render as the quiet state-cards.

Finish-audit fanout: security clean; orphaned MARK, stale doc comment,
and a phantom-border comment fixed; pass-selector remount reset and
solid-button contrast parked in the devlog (swift-wiki gotcha #28).

Suite 592/592 (xcresult count), swiftformat + swiftlint clean at the
error tier.

Closes #153
2026-11-04 10:37:13 +01:00

69 lines
6.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Restyle the mentor pane chrome (MentorPaneView) — build slice 2 of map #153
> **Date:** 2026-11-04
> **Type:** issue
> **Reference:** [#156](https://git.babylondreams.de/AlexKucera/museion/issues/156) (map [#153](https://git.babylondreams.de/AlexKucera/museion/issues/153), contract [#154](https://git.babylondreams.de/AlexKucera/museion/issues/154))
## Goal
Build slice 2 of the mentor-pane editorial-voice map: MentorPaneView's chrome per the locked contract (`ref/prototypes/wf154-mentor-pane-prototype.html` @ 9b1fa75) — header (serif title, green ready dot, session chip), the segmented mode picker dead (pass bar gains the Pass 1 / Pass 2 selector + status line), pass bar + fix-cards row in the mono voice, crash / missing-engine / starting states in the editorial voice. Close with build + test green, swiftformat + swiftlint clean, and this log.
## What Was Done
- `Museion/DesignTokens.swift` — `readyGreen` (#36664F) added: the map's sole palette exception, a semantic meaning ("engine healthy"), never a style color.
- `Museion/EngineStatusView.swift` — `MentorEngineStatus`'s ready branch remapped per contract: 6pt green dot + lowercase mono-10 `ready`; the base `hermes` version demoted to the tooltip; the advisory drift note stays visible (orange) when gate and handshake disagree. Checking / engine-missing / setup-failed branches untouched — they already spoke the mono-10 chrome voice.
- `Museion/MentorPaneView.swift`:
- **Header**: icon + "Mentor Session" headline died → serif-15/600 "Mentor"; session chip → mono-10 muted @ 0.75; pads 12→14.
- **Mode picker dead** (settled #4): `Mode` enum + `modePicker` + `passKind` computed deleted. `PassBarView` always renders in `.ready` — chat is not a mode; transcript + composer are always present (pass critiques already render in the shared transcript).
- **Pass bar rebuilt per contract**: compact selector (Pass 1 / Pass 2 text tabs, mono-10 uppercase tracked, active = fg ink + 2pt accent underline) → `PASS N · STATE` status line (mono-10 uppercase tracked) → sans-11 muted cost line → actions. `@State kind: PassKind` now lives in PassBarView (nothing outside reads it).
- **`MonoButton`** (private, new): the contract's `.btn` — mono-11, h 28, radius 6, three looks: accent solid (Run, Restart), surface + border (Blind Read), accent outline (Cancel — the danger voice). Hand-drawn fills per #155's sendButton precedent (borderedProminent carries the system tint, not the palette). Disabled = 0.45 opacity + `.disabled`.
- **Fix-cards row**: plain mono row ruling — no card chrome, no hairline of its own (the Divider above separates it from the bar), leading-aligned below the bar.
- **Crash card**: terracotta tri (danger = terracotta, no second hue — was orange), serif-14/600 head, sans-12 muted body, last prompt mono-11 muted, Restart as solid-accent MonoButton. Technical-details disclosure unchanged.
- **Starting interim**: `ProgressView("…")` → mini spinner + mono-11 muted line (the quiet system voice).
- DOX pass: `Museion/AGENTS.md` — MentorPaneView bullet (header/pass-bar/crash clauses rewritten for #156, stale #28 version-display note removed), engine-check section's header-states line, DesignTokens palette line (readyGreen exception).
## Decisions & Rationale
| Decision | Rationale |
|----------|-----------|
| Version demoted to tooltip, drift note stays visible orange | The contract's header is dot + `ready` + chip — chrome silence. The version is lookup info (tooltip suffices; state.json + rail card keep it), but the drift note is a rare advisory that must not disappear — visibility beats chrome purity for a warning that exists. |
| `MonoButton` shared by pass bar + crash card | Three button looks × four call sites — one 50-line private struct beats four hand-rolled copies; the #155 sendButton already proved the hand-drawn-fill pattern. |
| Selector state lives in PassBarView | Nothing outside the bar reads the selection — no binding threading through MentorPaneView for a private concern. |
| "Blind Read" casing kept over the mock's "Blind read" | The GLOSSARY term is binding project vocabulary; the mock's incidental casing is not a ruled value. |
| No new tests | Pure visual restyle; no new pure seams. `MentorEngineStatus.state` mapping (the pinned logic) untouched. |
## Gotchas & Fixes
| Problem | Root Cause | Fix |
|---------|------------|-----|
| First body patch over-indented `case .ready:` one level | Patch string authored one tab deep | Immediate follow-up patch; swiftformat then found nothing further to move |
| AGENTS.md DesignTokens patch failed to match | I paraphrased the file's wording from memory of the first read | Read the exact line tail (`awk NR==23`), retried verbatim — matched |
| `tea api` open-issues jq one-liner died on quoting/null labels | Some issues carry null `labels`/`assignees` | Defensive `(x // [])` coalescing in jq |
## Files Changed
| File | Change Summary |
|------|---------------|
| `Museion/DesignTokens.swift` | + `readyGreen` (sole palette exception) |
| `Museion/EngineStatusView.swift` | Ready branch → green dot + mono `ready`, version → tooltip |
| `Museion/MentorPaneView.swift` | Header restyle, mode picker dead, pass bar + MonoButton, fix row, crash/starting cards |
| `Museion/AGENTS.md` | DOX pass for #156 |
| `docs/devlog/20261104-issue156-mentor-pane-chrome-editorial-voice_log.md` | This log |
## Verification
- `xcodebuild … build` → **BUILD SUCCEEDED**
- `xcodebuild … test` → xcresult: **592/592 passed, 0 failed, 0 skipped** (582 at #155 + 10 from the #157 library-search coverage merge)
- swiftformat (changed files only) clean; swiftlint: no errors — one tolerated file-length warning (MentorPaneView 475/1000-error, #155's 573-line precedent)
## Open Items & Next Steps
- [ ] Code is **uncommitted on `main`** (working tree) — commit awaits explicit authorization (#155 precedent).
- [ ] Map #153 closes when the pane lands (merged); both build slices (#155 merged, #156 this log) then done.
- [ ] Audit-deferred (finish-audit 2026-11-04): pass-selector `@State kind` resets to Pass 1 when the `.ready` branch unmounts/remounts (crash → Restart, mentor-column collapse < 920px). Deliberate local state, one click to restore — move to `@AppStorage` if it ever annoys.
- [ ] Audit-deferred (finish-audit 2026-11-04): MonoButton solid look is surface-on-accent ≈ 3.85:1, under AA 4.5:1 for small text — inherited from #155's sendButton; fix both together in a pane-wide a11y pass (darker accent fill or bump label size) if flagged.
---
*Log written by write-log skill*