Skip to content

Follow Omarchy theme changes - #7669

Closed
rblalock wants to merge 5 commits into
pingdotgg:mainfrom
rblalock:feat/omarchy-linked-theme
Closed

rblalock wants to merge 5 commits into
pingdotgg:mainfrom
rblalock:feat/omarchy-linked-theme

Conversation

@rblalock

@rblalock rblalock commented Aug 20, 2026 •

Copy link
Copy Markdown

What Changed

  • Adds a desktop-only Omarchy Linked theme when Omarchy's generated VS Code palette exists at ~/.local/state/omarchy/current/theme/vscode-theme.json.
  • Watches Omarchy's stable current directory and refreshes the active palette after theme changes, including its remove-then-move swap behavior.
  • Hides the linked option when the palette is absent, preserves the last valid palette for malformed updates, and resumes automatically when a compatible theme returns.

Why

Omarchy already generates a VS Code theme for its current desktop theme, so why not just use that since T3Code supports it, yeh? This uses the existing way Omarchy points to a current theme so it makes integration easy. So users can opt into following Omarchy without hooks, configuration, server-side theme machinery, or a generic integration framework...just pick the "Omarchy Linked" theme and they don't have to do anything else.

UI Changes

Before After
Appearance settings without the linked theme Appearance settings with Omarchy Linked selected

Demo video: Watch T3 Code follow a live Omarchy theme switch

Verification

  • 57 focused tests passed, including swap-gap, permanent absence, invalid palette, and custom-theme identity regression coverage.
  • Desktop, web, and contracts targeted typechecks passed.
  • Desktop, web, and server production builds passed.
  • An isolated Electron run loaded the current 55,374-byte Omarchy palette, selected Omarchy Linked, switched away to T3 Chat, and restored linked mode.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for the UI change
  • I included a video for the theme-switch interaction

Note

Medium Risk
Adds a Linux filesystem watcher and new IPC that ships theme JSON into the renderer, plus localStorage caching used at boot. Bounded by size limits and platform gates, but it sits on the appearance/IPC path.

Overview
Lets Linux desktop users pick Omarchy Linked so T3 Code follows Omarchy's generated VS Code palette at ~/.local/state/omarchy/current/theme/vscode-theme.json, with no extra setup.

The main process watches Omarchy's stable current directory (not the swapped theme dir), retries through the remove-then-move gap, and pushes updates over IPC. The renderer parses that file into a reserved __omarchy-linked identity, caches the last valid palette for boot, and keeps the last good colors on malformed updates. The card only appears when a palette is present.

Also shares THEME_FILE_MAX_BYTES (256 KB) for both Omarchy reads and the existing theme-file picker.

Reviewed by Cursor Bugbot for commit e6a1e53. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add live Omarchy theme syncing between desktop and web renderer

  • Adds a Linux-only file watcher in the desktop main process that reads $HOME/.local/state/omarchy/current/theme/vscode-theme.json, debounces filesystem events, and broadcasts theme snapshots to all Electron windows via OMARCHY_THEME_CHANGE_CHANNEL
  • Exposes getOmarchyTheme and onOmarchyThemeChange through the preload bridge with strict payload validation, so the renderer can request and subscribe to Omarchy theme updates
  • Introduces syncOmarchyLinkedTheme to parse VS Code theme JSON into a reserved Omarchy Linked theme definition, with a cached palette in localStorage so the boot script can paint before React mounts
  • Renders an Omarchy Linked card in the theme gallery when a linked theme is available, wired into existing persistence and pair-picking flows
  • Replaces the local PICKED_THEME_FILE_MAX_BYTES in window.pickThemeFiles with the shared THEME_FILE_MAX_BYTES (256 KB) constant from contracts
  • Risk: readOmarchyThemeFile and watchOmarchyTheme are platform-gated to Linux and return null on other platforms; confirm no runtime path expects non-null outside Linux. The confirmMissingThemeFile retry loop tolerates Omarchy's remove-then-move swap gap but could delay a legitimate removal emission by the configured retry duration.

Macroscope summarized e6a1e53.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4fa8d33f-dc65-4349-9b54-91f247e360b9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 20, 2026

@macroscopeapp macroscopeapp Bot 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.

Reviewed the web-side changes (OmarchyLinkedThemeSync.tsx, useOmarchyLinkedTheme.ts, omarchyLinkedTheme.ts, themePalette.ts, ThemeSettings.tsx, SettingsPanels.tsx, __root.tsx) for consistency with the existing theme-library UI. The store/hook wiring matches the existing useCustomThemes pattern and the new component adds no markup of its own. Two findings on the new theme card call site in ThemeSettings.tsx, where the linked card behaves differently from every sibling card in the same grid.

Posted via Macroscope — UI Consistency

@rblalock
rblalock marked this pull request as ready for review August 20, 2026 12:52

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f0c53d0. Configure here.

Comment thread apps/web/src/themePalette.ts Resolved
@macroscopeapp

macroscopeapp Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a new feature for following Omarchy theme changes on Linux desktop, adding new IPC channels, file watchers, React components, state management, and UI integration. New features with this scope warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@rblalock

rblalock commented Aug 20, 2026 •

Copy link
Copy Markdown
Author

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a new feature for following Omarchy theme changes on Linux desktop, adding new IPC channels, file watchers, React components, state management, and UI integration. New features with this scope warrant human review.

You can add or adjust custom eligibility rules. Learn more.

It's addressed

@t3dotgg

t3dotgg commented Aug 28, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.

This adds a permanent file watcher and desktop IPC path for one Linux distribution's theme files. The narrow compatibility path does not justify its long-term maintenance cost.

If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants