Skip to content

revert(theme): drop Dimidium as a built-in, use stock theme import - #25

Merged
deanjstone merged 1 commit into
mainfrom
chore/remove-dimidium-builtin
Sep 6, 2026
Merged

deanjstone merged 1 commit into
mainfrom
chore/remove-dimidium-builtin

Conversation

@deanjstone

Copy link
Copy Markdown
Owner

Summary

  • Removes Dimidium as a compiled-in built-in theme, reverting the source half of #24.
  • Dimidium moves to a custom theme imported through stock T3 Code (Settings → Appearance → Import), using a file generated by the repo's own serializeThemeFile.
  • Takes the fork's theme divergence to zero source files.

Why

Preference for stock capability over fork-level divergence. Upstream already ships a theme import path, so carrying a palette in source was solving a problem the app solves itself.

This does not give back what #21 bought. index.css still carries no palette, so the conflict surface that motivated the port — 6 of the 21 conflicts in the 1295-commit sync — stays closed. The fork now carries less theme code than before #24, not more.

Revert fidelity

Five of six files return to matching upstream/main byte-for-byte:

File State
packages/shared/src/themePalettes.ts matches upstream
apps/mobile/generated-uniwind-theme-names.json matches upstream
apps/mobile/uniwind-types.d.ts matches upstream
apps/mobile/scripts/generate-uniwind-themes.test.ts matches upstream
apps/mobile/src/lib/mobileThemeRuntime.test.ts matches upstream
apps/mobile/generated-uniwind-themes.css pure 250-line deletion, exactly reversing #24

Generated artefacts were regenerated via vp run --filter @t3tools/mobile generate and the uniwind generate-artifacts CLI, not hand-edited.

Kept deliberately

The --info/--success block in index.css (21 lines). Upstream deliberately keeps success, info, provider and channel identity colours outside the themeable role set, so no imported theme can carry them. These four roles are the one part stock genuinely cannot express.

Known cost

Dimidium is no longer available in the React Native mobile app. MOBILE_THEME_IDS enumerates built-ins only and the mobile app has no custom-theme support at all (confirmed: zero references to the custom-theme storage key under apps/mobile/src). The iPhone PWA is unaffected — it runs the web bundle, which supports imported themes.

Side effect: the theme file becomes importable here

A theme file is generated at ~/dimidium.json (untracked). While dimidium was a built-in it could not be imported into this fork — BUILT_IN_THEME_IDS feeds RESERVED_THEME_IDS, and parseThemeFile throws The theme id "dimidium" is reserved. This PR frees the id.

Note the file carries the post-fix values, including #24's WCAG correction (placeholder was 4.07:1 light / 3.23:1 dark, now 4.60:1 in both) — so the imported theme is the accessible version, not the original palette.

Test plan

  • typecheck — exit 0, 0 errors
  • vp check — exit 0, 0 errors (593 pre-existing warnings)
  • Full mobile suite — 1230/1230, run from apps/mobile so the count matches CI's rather than an over-narrow filter
  • Not verified: importing ~/dimidium.json through the UI after merge, and its appearance in light/dark

Re-opens #21.

🤖 Generated with Claude Code

Prefer stock T3 Code capabilities over fork-level divergence. Dimidium
does not need to be compiled in: upstream already ships a theme import
path (Settings -> Appearance), and a theme file generated by the repo's
own serializeThemeFile imports cleanly as a custom theme.

Removing it takes the fork's theme divergence to zero. Five of the six
files here return to matching upstream byte-for-byte; the sixth is a pure
250-line deletion from the generated mobile stylesheet, exactly reversing
what #24 added.

This does not give back what #21 bought. index.css still carries no
palette, so the conflict surface that motivated the port -- 6 of the 21
conflicts in the 1295-commit sync -- stays closed. The fork now carries
less theme code than before #24, not more.

Kept: the --info/--success block in index.css. Upstream deliberately
keeps success, info, provider and channel identity colours outside the
themeable role set, so no imported theme can carry them. Those four roles
are the one part stock cannot express.

Known cost: the React Native mobile app enumerates built-ins only and has
no custom-theme support, so Dimidium is no longer available there. The
iPhone PWA is unaffected, since it runs the web bundle.

A theme file is generated at ~/dimidium.json. It could not be imported
into this fork while "dimidium" was a built-in -- BUILT_IN_THEME_IDS
feeds RESERVED_THEME_IDS, and parseThemeFile rejects a reserved id. This
commit frees it.

Verified: typecheck exit 0; vp check 0 errors; full mobile suite
1230/1230 run from apps/mobile, matching CI's count.

Re-opens #21.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.4 KiB 13.5 KiB +90 B (+0.7%) 15.1 KiB ✅
Codex Thread snapshot wire 7.0 KiB 7.0 KiB −3 B (−0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.5 KiB +93 B (+1.4%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 57.0 KiB +822 B (+1.4%) 66.4 KiB ✅
Codex Live turn messages 8 8 0 (0.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.6 KiB +59 B (+0.4%) 15.1 KiB ✅
Claude Thread snapshot wire 7.0 KiB 7.0 KiB −5 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.5 KiB 6.6 KiB +64 B (+1.0%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.8 KiB 57.9 KiB +88 B (+0.1%) 66.4 KiB ✅
Claude Live turn messages 8 10 +2 (+25.0%) 21 ✅

Baseline: eea8c23 · PR result: b64d8a0 · 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: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

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

@deanjstone
deanjstone merged commit e1d449a into main Sep 6, 2026
17 checks passed
@deanjstone
deanjstone deleted the chore/remove-dimidium-builtin branch September 6, 2026 23:30
deanjstone added a commit that referenced this pull request Sep 6, 2026
The comment said the Dimidium palette lives in themePalettes.ts as a
selectable theme. #25 removed it from the repo entirely — it is now
imported as a custom theme through Settings -> Appearance, so the pointer
sent a reader to a file that no longer mentions it.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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