Skip to content

settings: guard the theme editor's sidebar reachability - #22

Open
antonarnaudov wants to merge 1 commit into
mainfrom
guard-theme-editor-sidebar
Open

settings: guard the theme editor's sidebar reachability#22
antonarnaudov wants to merge 1 commit into
mainfrom
guard-theme-editor-sidebar

Conversation

@antonarnaudov

Copy link
Copy Markdown
Contributor

TL;DR — the reported bug is a stale install, not a v0.2.9 regression

A bug report said the Photoshop-style colour-wheel theme editor is unreachable in "v0.2.9": clicking Settings → Appearance → "Create your own custom theme" opens the browser instead of navigating in-app, and the "+" only opens the image modal.

That repro was against an old installed build (v0.1.0) — confirmed via the installed app's Info.plist (CFBundleShortVersionString = 0.1.0). In v0.1.0 that link was a README hyperlink (open_url → browser) and the sidebar had no theme sections.

It's already fixed on main / v0.2.9:

  • appearance_page.rs no longer renders a link — it shows text pointing at the sidebar.
  • The sidebar nav_items list includes CustomizeUi, ThemeGallery ("Explore themes"), and ThemeCreator ("Create your own custom theme") → ThemeCreatorPageView, hosting ThemeCreatorBody with the full hue/saturation/value colour wheel.
  • Navigation is in-app via build_nav_stops — no open_url in that path.

So no functional fix is needed; users on v0.1.0 just need to update.

What this PR does

Adds the regression guard requested in the report, so the in-app entry point can't be silently dropped again:

  • Extracts the sidebar nav list into a pure base_nav_items() (no behavior change — the builder just calls it, then applies the existing WarpControlCli insert).
  • Adds theme_editor_and_gallery_are_reachable_from_the_sidebar asserting ThemeCreator, ThemeGallery, and CustomizeUi each keep a sidebar entry.

Verified locally

  • cargo check -p warp --tests — compiles clean.
  • cargo test -p warp settings_view::tests::theme_editor_and_gallery_are_reachable_from_the_sidebar1 passed.

🤖 Generated with Claude Code

The reported "colour-wheel editor is unreachable" repro was against an old
installed build (v0.1.0), where "Create your own custom theme" was a README
link that opened a browser and the editor had no sidebar entry. That's already
fixed on main / v0.2.9: the Appearance page points at the sidebar, and the
nav lists CustomizeUi, ThemeGallery ("Explore themes"), and ThemeCreator
("Create your own custom theme") → the ThemeCreatorPageView with the colour
wheel. No functional change is needed.

To keep it that way, extract the sidebar nav list into a pure `base_nav_items()`
and add a regression test asserting the theme editor, theme gallery, and
Customize UI each keep a sidebar entry — so the in-app entry point can't be
dropped again in a refactor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant