Skip to content

Themes from Gecko Suite, chosen for Notes (M7, SN-8) - #222

Merged
davior merged 1 commit into
mainfrom
claude/beautiful-wright-og4xur
Nov 4, 2026
Merged

davior merged 1 commit into
mainfrom
claude/beautiful-wright-og4xur

Conversation

@davior

@davior davior commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Summary

With IDENTITY_PROVIDER=suite, Notes' themes now come from Gecko Suite (suite plan M7, SN-8). The suite keeps the theme library, which is made and edited on its Themes page, and Notes wears its own choice (theme.notes), so it can differ from GAM and GVC.

With IDENTITY_PROVIDER=notes nothing changes. Notes' own theme tables stay until M8.

  • Settings → Themes:
    • lists the suite's themes, shared and your own, with Apply / Remove as before;
    • adds a "Create and edit themes in Gecko Suite" button;
    • drops creating and editing here, since that happens in the suite for all four apps at once.
  • api/suiteThemes.ts:
    • The browser asks the suite directly, with Notes' token.
    • It uses its own HTTP client, so a refusal from the suite never signs anyone out of Notes.
    • It returns themes in Notes' Theme shape, so the settings screen and applyThemeToDom are unchanged.
  • Suite unreachable: Notes draws the last theme it wore at start and keeps it if the suite doesn't answer.
  • Shared notes: the public page has nobody signed in to ask the suite as. Choosing the shared-note theme therefore stores a copy of its values (shared_theme). routers/shared.py serves that copy ahead of the older shared_theme_id, which still works.
  • CSP: connect-src gains https://suite.geckopico.com, next to the existing GAM address. img-src allows https images, because a theme background is any address.
  • Header and sign-in pages: the favicon graphic replaces the 🦎 emoji (requested).

Needs gecko-suite#14. Matches davior/gam#63 and davior/gvc#42.

Test plan

  • cd backend && pytest -q: 1429 passed, 1 skipped. Three of those are new in tests/test_shared_theme.py:
    • a copy of a suite theme dresses the shared note, and wins over the old id while ignoring the owner fields inside the copy;
    • the older shared_theme_id still works;
    • a broken copy shows the note without a theme.
  • cd frontend && npm test && npm run build: 234 tests pass, build succeeds. There are no new frontend tests: Notes' frontend tests run without a DOM or localStorage, and the new code is browser-only. The suite and GAM tests cover the same logic.
  • Not run: in a browser against the deployed suite.

Deployment

  1. Before pulling: deploy gecko-suite#14 with CORS_ORIGIN listing Notes' address (https://notes.geckopico.com), then run the suite's importer so Notes' themes and each person's choice come across (docs/deploying.md §7).
  2. Configuration: nothing new. This takes effect with IDENTITY_PROVIDER=suite, which you already have.
  3. Deploy. This rebuilds the backend and the frontend.
    git pull origin main
    docker compose up --build -d
    Then hard-refresh.
  4. Verify:
    • Settings → Themes lists the suite's themes and links to the suite.
    • Applying one redraws Notes but not GAM.
    • A shared note shows the theme set for shared notes; set it again once after deploying, so the copy is stored.
    • The browser console shows no CSP errors.
  5. Roll back: redeploy the previous commit. Notes' own theme tables were never touched.

Generated by Claude Code

With IDENTITY_PROVIDER=suite, Notes' themes come from Gecko Suite: the
library is the suite's (made and edited on its Themes page) and Notes wears
its own choice (theme.notes), so it can differ from GAM and GVC. Notes'
Themes settings list the suite's themes to choose from and link to the
editor. With IDENTITY_PROVIDER=notes nothing changes.

- api/suiteThemes.ts: the browser asks the suite directly with Notes' token,
  through its own axios instance (a refusal never signs anyone out of
  Notes), answering in Notes' Theme shape so the settings and
  applyThemeToDom are unchanged.
- The last theme worn is cached and drawn at start, and kept when the suite
  does not answer.
- Shared notes: the public page cannot ask the suite, so choosing the
  shared-note theme stores a copy of its values (shared_theme), which
  routers/shared.py serves ahead of the older shared_theme_id.
- CSP: connect-src gains the suite; img-src allows https images (a theme
  background is any address).
- The header and sign-in pages show the favicon instead of the emoji.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD2ELWgL2sDpxYbx3Aw
@davior
davior marked this pull request as ready for review November 4, 2026 22:51
@davior
davior merged commit 0abfc85 into main Nov 4, 2026
2 checks passed
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.

2 participants