Skip to content

fix(web): stop fork markers rendering as UI text, and remember the right panel's shape - #137

Merged
tusharbhardwaj-bk merged 2 commits into
expbkmainfrom
t3code/merida-panel-layout
Aug 27, 2026
Merged

fix(web): stop fork markers rendering as UI text, and remember the right panel's shape#137
tusharbhardwaj-bk merged 2 commits into
expbkmainfrom
t3code/merida-panel-layout

Conversation

@tusharbhardwaj-bk

@tusharbhardwaj-bk tusharbhardwaj-bk commented Aug 27, 2026

Copy link
Copy Markdown

Problem

Two things, both reported from expbkt3 after the upstream merge.

1. Fork marker comments were being rendered into the UI. Four // T3-CUSTOM(expbkt3): ... comments landed in JSX children position inside the traits chip, so React rendered them as literal text next to the model picker — visible in the composer, in Settings → General (where the stray text also wrecked the "Default agent model" row layout), and in every project's new-thread defaults. My mechanical marker pass during the merge put them there; markers in attribute position and in plain TypeScript are fine, children position is not.

2. The right panel forgot how you like to work. Upstream keeps "is the right panel maximized" as a per-thread key in component state, so opening a plan full-screen in one thread and then opening a plan in another gave you side-by-side again — and a reload always reset it.

How

Removes the four comments, and adds apps/web/src/forkMarkerPlacement.test.ts: it walks every .tsx under apps/web/src and fails on any T3-CUSTOM marker sitting in JSX children, while allowing the legitimate attribute-position ones. Verified it catches the regression by re-introducing one deliberately — it failed and named the exact line.

For the panel, the maximized choice moves into local storage behind a fork-owned hook (rightPanelLayoutPreference.ts), so every surface — plan, browser, files — opens in the shape you last chose, and closing a panel no longer discards it. Width needed no work: PreviewPanelShell already persists it globally under t3code:preview-panel-width.

Kept deliberately cheap to re-merge: one new fork-owned module plus four marked lines in ChatView.tsx (the state declaration, the derivation, the toggle, and the close path), rather than logic threaded through the component.

Verification

apps/web typechecks clean; vp check clean on the touched files. New tests pass (4 preference + 1 placement guard), as do ChatView.logic, TraitsPicker, Sidebar.logic and session-logic (263 tests). Fork marker check passes.

Model: Claude Opus 5 in Claude Code.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…ght panel's shape

Four T3-CUSTOM marker comments from the upstream merge landed in JSX children
position inside the traits chip, so React rendered them as literal
"// T3-CUSTOM(expbkt3): ..." labels beside the model picker in the composer, in
Settings > General, and in each project's new-thread defaults. Removes them and
adds a fork-owned test that scans every .tsx for markers in children position,
so the class cannot come back.

Also makes the right panel open the way it was last used. Upstream tracks
"maximized" as a per-thread key in component state, so full screen was forgotten
on every thread switch and reload; the choice now lives in local storage behind
a fork-owned hook, and closing a panel no longer discards it. Width already
persisted upstream under t3code:preview-panel-width and is unchanged.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 15.1 KiB
Codex Thread snapshot wire 7.2 KiB 7.3 KiB
Codex Live turn WebSocket wire 6.4 KiB 7.8 KiB
Codex Live turn WebSocket decoded 55.7 KiB 66.4 KiB
Codex Live turn messages 11 21
Claude Total thread wire 13.6 KiB 15.1 KiB
Claude Thread snapshot wire 7.2 KiB 7.3 KiB
Claude Live turn WebSocket wire 6.4 KiB 7.8 KiB
Claude Live turn WebSocket decoded 56.5 KiB 66.4 KiB
Claude Live turn messages 11 21

Baseline: unavailable · PR result: ec3bb06 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 110.4 KiB
  • Claude decoded thread snapshot: 111.1 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

…text

Moves the JSX-children guard out of a web unit test and into the marker checker
that already runs repo-wide in CI. The web app's Effect lint bans raw node:fs
imports, and this is marker discipline rather than app behaviour, so it belongs
beside the existing rule. Rendered markers are never baselined: they are a
visible defect, not merge debt.
@github-actions github-actions Bot added size:L and removed size:M labels Aug 27, 2026
@tusharbhardwaj-bk
tusharbhardwaj-bk merged commit bd35ffb into expbkmain Aug 27, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant