Skip to content

Add theme support for T3 Code - #8784

Merged
ryanrhughes merged 3 commits into
quattrofrom
t3-theme-support
Sep 7, 2026
Merged

ryanrhughes merged 3 commits into
quattrofrom
t3-theme-support

Conversation

@ryanrhughes

@ryanrhughes ryanrhughes commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Makes T3 Code follow the active theme like all other applications.

screenrecording-2026-08-28_12-15-54_trimmed.mp4

NOTE: This is reliant on an upstream feature in T3 Code being merged. pingdotgg/t3code#8569

For now, we have t3code-patched-bin that can be installed from OPR for testing or anyone who just wants the feature early.

Copilot AI balanced review requested due to automatic review settings August 28, 2026 16:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds active Omarchy theme support for T3 Code.

Changes:

  • Generates and synchronizes a T3 Code palette.
  • Configures theme selection during installation.
  • Integrates installation, theme switching, and template classification.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
default/themed/t3code.json.tpl Defines the generated T3 Code palette.
bin/omarchy-theme-set-t3code Atomically publishes the palette.
bin/omarchy-theme-set Runs T3 Code synchronization after theme changes.
bin/omarchy-install-ai-t3-code Installs, configures, and launches T3 Code.
default/omarchy/omarchy-menu.jsonc Routes installation through the dedicated installer.
test/shell.d/theme-staging-test.sh Classifies the generated palette as color-only.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@coygeek

coygeek commented Aug 29, 2026

Copy link
Copy Markdown

The corresponding PR was merged in T3code.

@spencerbull

Copy link
Copy Markdown
Contributor

Reviewed head 0b40fa56e14ad251d5b5fcbcfc71a7458d358b36 against quattro. One defect needs the author; the rest checked out on a worker.

Medium — bin/omarchy-install-ai-t3-code:40-43: a user who updates and installs T3 Code before their next theme change gets no palette, and the installer says otherwise. current/theme/t3code.json only exists once the current theme has been re-staged, and omarchy-update on quattro does not re-stage themes; the one migration that did, 1787481315.sh, predates this branch and is already marked done for everyone current. In that state omarchy-theme-set-t3code exits 0 at line 15 without publishing, t3 theme set omarchy fails with ThemeIdUnknownError: No theme named "omarchy" on stdout, which line 18 sends to /dev/null, and the jq fallback writes {"defaultTheme": "omarchy"} with no defaultThemeSetAt. The terminal shows "Matching T3 Code to the current theme..." and "T3 Code has been installed.", T3 Code opens in its stock look, and t3 theme show reports "Published themes: none". Reproduced on a disposable worker built from the 4.0.1 ISO, whose staged theme predates the template exactly as an updated install's does. It heals itself on the next theme switch, because the T3 client waits for an id that does not resolve yet, so nobody is stuck, but the installer has claimed a match it did not make. bin/omarchy-install-editor-helix handles the same case: when the rendered file is missing it runs omarchy-theme-refresh first. A migration calling omarchy-theme-refresh, as migrations/1779242346.sh did for Pi, would close it as well.

Low — bin/omarchy-install-ai-t3-code:12-14: the fallback's premise is stale. t3code-bin 0.0.38-1 in the Omarchy repository owns /usr/bin/t3, with theme set, clear and show in it, so after omarchy-pkg-add t3code-bin the omarchy-cmd-present t3 branch always runs and the jq path is only reached when t3 theme set itself fails, which today means the case above. Either drop it or have the comment say what it now covers. The PR body's dependency note and t3code-patched-bin are stale for the same reason: pingdotgg/t3code#8569 merged on 2026-08-29 and v0.0.37 onward carry it.

Checked on a worker with this branch as $OMARCHY_PATH. ./test/cli passes and test/shell.d/theme-staging-test.sh passes 8 of 8. All 22 shipped themes render t3code.json as valid JSON with no unresolved placeholder, omarchy-theme-set-t3code publishes each one, and t3 theme show on T3 Code 0.0.38 lists every one. T3 Code running on the worker's compositor retinted live from White to Tokyo Night on omarchy-theme-set with no restart. A theme with no accent leaves {{ accent }} and three mix tokens unresolved, the guard at line 20 skips with its message, and the previous palette stays published, as the comment says. The installer ran end to end on the worker in both the upgrade state above and a fresh one.

Second opinion. Codex GPT-5.6 at xhigh reviewed the head read-only and reached the upgrade-path finding on its own; independence is not guaranteed on this machine. Its other candidates, checked against the tree: a hand-written themes/omarchy.json is overwritten — rejected, T3 Code documents that directory as the machine's publishing directory and omarchy-theme-set-claude and -pi make the same trade; ANSI-only legacy themes never get a T3 palette because accent is not derived from color4 — true, and equally true of claude.json.tpl and pi.json.tpl, so the guard's keep-the-old-palette outcome is the right one here rather than a defect; rerunning the installer re-applies the Omarchy theme over a later in-app pick — true, but only by invoking the installer directly, since the menu disables it once t3code-bin is present; omarchy-remove-ai-t3-code ignores a custom T3CODE_HOME — pre-existing and untouched by this PR.

Nothing was pushed. Waiting on the author for the upgrade path; then this is the maintainer's to land.

🤖 Generated by Claude Fable 5.1 in Claude Code. Reviewed by Codex GPT-5.6 XHigh.

T3 Code reads themes an environment publishes into its state directory, so
a generated t3code.json carries the palette the same way claude.json and
vscode-theme.json already do, and omarchy-theme-set-t3code republishes it
on every theme change for the app to pick up live.

The template overrides only the roles a theme actually designs -- terminal
and code surfaces, text on canvas, borders, selection -- and leaves muted
text, placeholders, and status foregrounds to T3 Code, which contrast-solves
them against whatever canvas it is given. Overriding those directly cost
readability on light themes: White fell to 1.0:1 on placeholder text.

Installing from the menu now routes through omarchy-install-ai-t3-code so a
fresh install publishes the current palette and opens wearing it.
@ryanrhughes
ryanrhughes requested a review from dhh as a code owner September 7, 2026 17:06
@ryanrhughes
ryanrhughes merged commit 5fb2cc7 into quattro Sep 7, 2026
ryanrhughes added a commit that referenced this pull request Sep 8, 2026
Add theme support for T3 Code

(cherry picked from commit 5fb2cc7)
(cherry picked from commit f1e9f5a4e14cb266c85b9956d64d3d0a7835a654)
ryanrhughes added a commit that referenced this pull request Sep 8, 2026
Add theme support for T3 Code

(cherry picked from commit 5fb2cc7)
(cherry picked from commit f1e9f5a4e14cb266c85b9956d64d3d0a7835a654)
Sign up for free to 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.

4 participants