Skip to content

Skill fast-path hardening, lineage retune + colors, per-tab pop-out, reliable tab alerts - #291

Merged
Ark0N merged 3 commits into
masterfrom
feat/alerts-lineage-popout
Aug 15, 2026
Merged

Skill fast-path hardening, lineage retune + colors, per-tab pop-out, reliable tab alerts#291
Ark0N merged 3 commits into
masterfrom
feat/alerts-lineage-popout

Conversation

@Ark0N

@Ark0NArk0N commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Four independent fixes/features that came out of one measurement session (2026-08-15), all end-to-end tested against a live isolated beta instance.

What changed

1. Agent skill: no more reconnaissance turns (skills/codeman/SKILL.md)
A live two-worker spawn took 28.6s, and 12s of it was two avoidable model turns: a standalone preamble check (§0's own loader already opens every recipe) and an exploratory ls ~/codeman-cases (invented fresh names need no lookup; spawn_worker refuses collisions). §0 and §1 now forbid both explicitly, and the cost list gained a reconnaissance bullet with the measured numbers. Re-measured after the change: 20.2s cold / 12.8s warm for the identical prompt, with the spawn machinery untouched (the win is pure turn elimination). Doc-only; the §0 heredoc is untouched (byte-pinned by test/agent-skill.test.ts, 16 tests green).

2. Lineage lines: shallower bow, strip-bottom baseline, per-child colors
The dip corridor has now failed in both directions: the original 44px cap read as a straight thread at strip-wide spans (#285), and the 104px cap that replaced it stacked with the full row offset and bowed ~106px into the terminal on wrapped strips. The dip now hangs from the strip's bottom edge (baseline = max(pBottom, cBottom, stripBottom)), capped at 64px, slope 0.085 to 0.06/px, with no row offsets: the strip-bottom baseline is also what keeps an arc between two row-1 tabs from drawing through row 2's labels (the retune's own first draft had that regression; caught in a pixel-true harness).

Colors: multiple connected tabs now get distinct arcs. CodemanLineage.COLORS cycles per child in first-seen order (stable across re-renders): skin-tuned blue first (empty entry falls through to --session-blue), then matrix green, pink, violet, red, turquoise, orange. The color rides an inline --lineage-color custom property so styles.css keeps owning opacity/glow/dash.

3. Session Options: per-tab pop-out button
The general showTabDetachButton App Setting stays as-is; Session Options > Session gains "Pop-out button on this tab", a per-device override (localStorage map, pruned of dead sessions) that shows the open-in-window button on one tab while the general toggle is off. Rendered as a tab-show-detach class the CSS gate exempts; the active-tab reveal rules stay shared so an overridden tab behaves exactly like one under the general toggle. Applies instantly (the toggle also patches the live DOM, because the debounced render can take the incremental path that patches rather than rebuilds) and survives reloads. Phones unaffected (mobile.css hides the button with !important).

4. Tab alerts: survive reloads, survive selection, and actually look red
Three stacked problems, observed live with a permission dialog blocking a session:

  • The alert seed from GET /api/approvals was gated on approvalsInboxEnabled (default OFF), so a page loaded after the prompt fired had no alert anywhere. The seed now always re-arms the pending-hook state machine (the server-side approval store runs regardless of the setting); only the inbox surfaces stay gated. _onApprovalResolved clears the alert unconditionally for the same reason.
  • The blink keyframes swung background and border to transparent at 0%/100%, so for roughly half of every cycle an alerted tab was indistinguishable from a normal one. The alert is now a steady red/yellow border + tinted background + colored status dot + glow, with the pulse only breathing intensity.
  • .session-tab.active forces background/border/box-shadow with !important, which beats even a running animation, so the alert vanished the moment the tab was selected while the permission was still blocking. The alert now paints on a ::before overlay (the same convention the entrance animations use for exactly this reason), so it persists on the active tab and clears only when the approval resolves.

Also adds docs/worker-warm-pool-plan.md, a design sketch for pre-warmed claude workers (sub-second spawn claims), with the measured baselines baked in.

Reviewing the diff

The line count overstates the change: a large share of the styles.css and SKILL.md churn is comments recording why each number/rule is what it is (both files have a history of well-meaning retunes reverting earlier fixes). The behavioral core is: the computeLineagePath baseline change, the seedApprovals/_onApprovalResolved gating change, the ::before alert overlay, and ~40 lines of per-tab override logic in session-ui.js.

Testing

  • test/session-lineage-lines.test.ts re-pinned: 64px cap exact, strip-bottom baseline (including the row-1-over-row-2 case), palette shape (13 tests)
  • 65 tests across the settings-surface structure guards, mobile overview, agent skill, and SSE registry parity; tsc --noEmit, frontend syntax + public asset checks, PostCSS parse all green
  • Live e2e on an isolated beta: real skill orchestrators spawned 6 real workers (arc colors and geometry asserted in-browser), per-tab pop-out toggled through the real Session Options UI, tab alerts verified for reload-seeding with the inbox OFF, selection persistence, and resolution clearing

Screenshots

Captured live from an isolated instance running this branch: three real shell sessions, alerts armed through the real pending-hook state machine (setPendingHook), no synthesized UI.

A regular active tab, a yellow waiting-for-input tab, and a red needs-decision tab:

Tab alerts: regular, yellow (waiting for input), red (needs a decision)

The breathing glow (now also embedded in the README, one clean 17.5s loop covering both pulse cycles):

Tab alert glow animation

Note the steady base: at every instant of the cycle both alerted tabs stay visibly ringed and tinted, which is the fix over the old animation that swung to transparent for half of each cycle.

…-out, reliable tab alerts
- SKILL.md: forbid the standalone preamble check and pre-spawn recon turns
(measured: two wasted model turns cost ~12s of a 28s two-worker run; the
hardened flow measured 20.2s cold / 12.8s warm end to end)
- Lineage lines: dip now hangs from the strip's bottom edge (cap 104 -> 64,
no stacked row offsets), fixing the deep bow in wrapped strips and keeping
row-1 arcs off row-2 tab labels; per-child color palette (skin blue first,
then matrix green, pink, violet, red, turquoise, orange) via an inline
--lineage-color custom property
- Session Options -> Session: per-TAB pop-out (open-in-window) button override
on top of the general showTabDetachButton setting; per-device localStorage
map rendered as the tab-show-detach class
- Tab alerts: seed the pending-hook state machine from GET /api/approvals
regardless of the approvals-inbox setting (reloads used to lose the red tab
entirely with the inbox off), clear unconditionally on approval_resolved,
and repaint the alert as a steady red/yellow ring + glow + status dot on a
::before overlay so it stays visible on the selected (active) tab until the
permission is actually resolved
- docs: worker warm-pool design sketch (verified numbers baked in)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… guard stripBottom against a non-finite strip.top
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Captured live from an isolated instance running this branch: a regular
active tab beside a yellow waiting-for-input tab and a red needs-decision
tab. The gif covers one full 17.5s loop (LCM of the 2.5s red and 3.5s
yellow pulse cycles), so it loops cleanly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Ark0N
Ark0N merged commit 9ee6bf1 into masterAug 15, 2026
2 checks passed
CreatureSurvive pushed a commit to CreatureSurvive/Codeman that referenced this pull request Aug 17, 2026
Brings in christianhaberl#4 (three commits,
authorship preserved) and adapts it across the 211 commits master gained
since the branch was cut:
- App Settings control re-authored for the set-* surface (PR Ark0N#278): a
set-row in Layout -> Tabs, replacing the old settings-item markup the
branch targeted. i18n description synced.
- Lineage arcs (PR Ark0N#291, post-branch) are SKIPPED in sidebar layout:
computeLineagePath()'s U-bridge geometry hangs from the horizontal
strip's bottom edge and has no meaning against a vertical list. The
lineage strip-scroll listener now also redraws subagent/ultracode
connectors while the sidebar scrolls vertically.
- The desktop home tab rail (post-branch) defers to the sidebar: both dock
the session list flush left, and the rail would render z-ordered under it.
- Active-row reveal unified into _scrollActiveTabIntoView() (Ark0N#257 landed on
master after the branch): sidebar mode branches to scrollIntoView
block:'nearest', and _fullRenderSessionTabs() restores scrollTop alongside
the Ark0N#257 scrollLeft restore so ambient rebuilds cannot yank a mid-scroll
sidebar back to the top.
- Mobile active-tab hoisting the branch guarded against no longer exists on
master (removed by Ark0N#257); kept master's order-stable render.
Verified: typecheck, lint, format:check, check:frontend-syntax,
check:public-assets, PostCSS parse of both merged stylesheets, the 26 new
jsdom tests, the structural guard suites, and the headless-Chromium harness
(scripts/verify-session-sidebar.mts) green across all seven layout states
at 1600/1000/393px against current master.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto 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

@Ark0N@claude