Skip to content

refactor(ui): shared settings files in ui-shared (#544) - #545

Merged
Maxaubert merged 1 commit into
mainfrom
ui/shared-core
Nov 4, 2026
Merged

Maxaubert merged 1 commit into
mainfrom
ui/shared-core

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Fixes #544.

The 11 settings UI files that were byte-identical in ui/ (Windows) and mac/ui/ (Mac), plus the theme generator, now live once in ui-shared/. Net: 1102 lines removed, 105 added.

  • Moved: controls/Toggle.svelte, controls/bindings.css, design/icons.js, design/themes.css, design/themes.js, lib/dialog.js, prefs/ThemePicker.svelte, search/search.js, shell/Banner.svelte, shell/Card.svelte, shell/ScrollChip.svelte, tools/gen-themes.cjs.
  • Both apps import them as $shared/... through a Vite alias, with svelte deduped to each app's own copy. Imports inside ui-shared stay relative. Node tests use relative paths.
  • Removed the Mac copy of gen-flyout-palettes.cjs, which writes a Windows file.
  • mac.yml runs on ui-shared/**, and build.yml/release.yml already do. Path fixes: test_flyout_palettes.cpp, the copyright gate's generated list, docs, CLAUDE.md files, and ui-shared/README.md.
  • Left in each app: App.svelte (identical, but it's the app entry), public/c-grey.jpg (each app's public dir), lockfiles, and all near-identical files (stage 2).

Verified on Windows:

  • ui/: build, test:rules, Playwright 218/218.
  • mac/ui/: build, test:rules 15/15, Playwright Chromium 139/139. WebKit isn't installed on this PC; the mac CI job runs it.
  • build.bat test (palette test reads the moved themes.css), build.bat config, copyright gate.

Mac session: please run scripts/build.sh on the Mac once this is merged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kg7JN6HgdB9FaHJsgLxovP

Toggle, bindings.css, icons, themes (and gen-themes.cjs), dialog.js,
ThemePicker, search.js, Banner, Card and ScrollChip were byte-identical
in ui/ and mac/ui/. They move to ui-shared/src, imported as $shared/...
through a Vite alias (svelte deduped to each app's copy). The Mac copy of
gen-flyout-palettes.cjs is dropped: it writes a Windows file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kg7JN6HgdB9FaHJsgLxovP
@Maxaubert
Maxaubert merged commit 218d4a4 into main Nov 4, 2026
2 checks passed
@Maxaubert
Maxaubert deleted the ui/shared-core branch November 4, 2026 21:51
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.

Share the settings UI files both apps use (ui-shared)

1 participant