fix(split-pane): gate the Split button to desktop, make it per-device

Ark0N's PR #453 review: nothing gated this feature to desktop even
though the design called for it (two 240px min-width panes plus the
divider need ~486px, and the divider has no touch handlers), and
showSplitButton was a SYNCED setting, so turning it on at a desk also
put the button in the phone header.

- Hard-hide .btn-split on phones in mobile.css regardless of the
  setting, matching the other desktop-oriented header buttons in the
  same @media (max-width: 599px) block.
- Move showSplitButton into settings-ui.js's per-device displayKeys
  set and drop it from SettingsUpdateSchema entirely, matching the
  showFileViewerButton/skin precedent (CLAUDE.md's "per-device keys
  ... must NOT be added to SettingsUpdateSchema" rule) — a desktop
  opt-in must never sync onto a phone that never asked for it. Removes
  the now-invalid server-round-trip test for the setting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
timkjr
2026-09-20 13:10:32 -05:00
co-authored by Claude Sonnet 5
parent 8d3bde5469
commit 6c8bd6c606
4 changed files with 13 additions and 3 deletions
+7 -1
View File
@@ -526,7 +526,13 @@ html.mobile-init .file-browser-panel {
/* Approvals bell: phones answer from the overview's NEEDS YOU rows instead
(inline approve/deny in mobile-overview.js); the bell would only crowd the
header it was designed to stay out of. */
.btn-icon-header.btn-approvals {
.btn-icon-header.btn-approvals,
/* Split-pane: desktop-only by design (two 240px min-width panes plus the
divider need ~486px, which a 393px phone cannot give them, and the
divider has no touch handlers). This is a hard gate independent of the
opt-in showSplitButton setting/marker class, so turning the setting on
at a desk can never also put the button in the phone header. */
.btn-icon-header.btn-split {
display: none !important;
}
+1
View File
@@ -3373,6 +3373,7 @@ Object.assign(CodemanApp.prototype, {
'showTabDetachButton',
'mobileOverviewEnabled',
'sessionLineageLines',
'showSplitButton',
]);
// The plan-usage chip is a PER-DEVICE display setting (desktop default ON,
// handheld default OFF): desktop can show it while mobile stays hidden. Drop
+4 -1
View File
@@ -1376,7 +1376,10 @@ export const SettingsUpdateSchema = z
showFileBrowser: z.boolean().optional(),
showSubagents: z.boolean().optional(),
showMultiMonitorButton: z.boolean().optional(),
showSplitButton: z.boolean().optional(),
// showSplitButton is per-device (displayKeys in settings-ui.js) and
// deliberately NOT declared here, matching showFileViewerButton/skin/etc:
// a desktop opt-in must never sync onto a phone that never asked for it,
// and the phone header hard-hides .btn-split regardless (mobile.css).
// Doubles as the plan-usage telemetry COLLECTION switch, read fresh from
// disk by readPlanUsageTelemetryEnabled() (hooks-config.ts) at every claude
// session create/respawn — not just the chip's DISPLAY preference. See that