Skip to content

feat(design): share Desktop, overlay and local phone theme roles - #2305

Open
abrichr wants to merge 6 commits into
mainfrom
codex/unified-semantic-theme
Open

abrichr wants to merge 6 commits into
mainfrom
codex/unified-semantic-theme

Conversation

@abrichr

@abrichr abrichr commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Desktop, its execution overlay and its separately served phone shell derive their colors and semantic roles from the same pinned theme. Product density, paper/phosphor behavior, OS dark mode and the explicitly dark overlay remain intact. The pin is f50e9c149cb868921e4ce414969dc57d44dc975b; its eight vendored files remain byte-identical.

The phone CSS and browser chrome colors are generated from that contract. Its public font and license extend the existing exact static-asset and shell-cache lists. CSP, protected-route authentication and protected-data cache refusal are unchanged. The frontend ships all three font licenses.

Current main 3f43a048 is ordinarily merged, preserving the original dd8bc9093 theme history. A reproduced checkout defect is also fixed: Git with core.autocrlf=true changed seven of nine new vendor files and made their raw-SHA guard refuse them. Scoped attributes now preserve both vendor generations and font bytes, and keep generated phone files on LF. The real Git checkout property test fails on the original attributes and passes in both conversion modes after the fix; no palette or font bytes changed.

Validation: 12 serial UI/token/font/checkout/overlay tests; 79 portal/static/CSP/cache/palette tests with zero pytest forks; overlay native-contract synchronization; TypeScript/Vite build; wheel/sdist inspection and source-boundary checks; size ratchet and targeted Ruff. Twelve headless role cases and six actual-page/component previews cover Desktop, nested themes, the overlay and the real local phone handler. The tested role colors exceed 4.5 against the contract canvas; phone views have no horizontal overflow or CSP violations. All previews use synthetic fixtures. No native installer or new runtime execution is claimed.

Hold independent main merge and release. Producer publication and visual review remain pending. This source is to be ordinarily merged into the existing combined candidate #2314 before its final dependency/version qualification, preserving this PR and review history. Version metadata remains unchanged; release intent correctly refuses a separate release and requires a minor bump for the original feature commit. No auto-merge is enabled.

  1. No per-app engine code: shared frontend roles and exact static assets only.
  2. Fix the class: one semantic contract covers root, nested, overlay and phone surfaces; one byte-preservation model covers both vendor generations and generated shell files.
  3. Held-out evidence: separately served phone, nested themes and configured Git checkout cases; visual/static evidence, not another application run.

Durable item: consistent visual meanings help a person distinguish checked effects, safe stops and reconciliation in independent receipts.

@abrichr
abrichr marked this pull request as ready for review November 20, 2026 03:55
@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

From: Codex
Reviewed-Head: ab96329

Author vendor: OpenAI/Codex.

The original theme source is preserved, current main is ordinarily merged, and the reproduced Git checkout byte-conversion defect is repaired. This head is frozen for independent technical review. Producer/visual approval and the single combined release-candidate integration remain held as described in the PR. Ready state enables CI; it does not authorize an independent main merge or release.

@abrichr abrichr added the review-needed Needs an independent review from another vendor's agent label Nov 20, 2026
@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: ab96329

Verdict: APPROVE. No P1 or P2 findings. The PR body's claims reproduce. The remaining gaps are P3 test-coverage items.

Claims verified

  • Pin bytes: all 8 provenance.json hashes match the vendored bytes. 7 of them also match the raw upstream files at f50e9c14. I re-ran the upstream exporter at the pin, and all 9 output files are byte-identical to src/styles/vendor/semantic-theme/, including fonts.css and provenance.json. theme:check passes.
  • CRLF: I did a fresh sparse clone with core.autocrlf=true.
    • With the base .gitattributes, 7 of the 9 new vendor files change. The raw-SHA guard refuses with Semantic theme drift: semantic-theme.css, and the generator check reports Phone theme drift: styles.css.
    • With this head's attributes, every hash-bound and generated file keeps its blob bytes (git hash-object --no-filters), and both guards pass.
    • The only files still converted are app.js, sw.js and stops.*. They were converted before this PR too and are not hash-bound.
  • Generator: build-phone-theme.mjs regen is byte-identical across the shell, and --check passes. The light/dark theme-color and manifest colors come from --oa-canvas. Text roles reach ≥4.96:1 against canvas and panel in both modes; the lowest is light success.
  • Server and service worker: the server.py change is only 2 new exact SHELL_ASSETS entries. CSP, the auth prefix and the cache refusal are untouched, and the sw.js change is only 2 precache entries. The new test covers same-origin font serving, no font-src, and a 404 on /fonts/../server.py.
  • Licenses: the built dist/licenses/ holds all 3 OFL texts. Public Sans bytes and license are identical between the old and vendored copies.
  • Merge: a merge-tree against main 648e7fda is clean.

Tests run (Linux x86_64, Node 24, Python 3.12, uv locked)

  • pytest tests/test_portal: 176 passed, 0 pytest forks. Of these, 35 are palette and new-server tests.
  • vitest run: 408 passed, 48 files. This includes themeCheckout with both conversion modes.
  • npm run build (prebuild theme checks, tsc, vite): OK.
  • Ruff on the portal: clean.

Mutations: 10 killed, 5 survived

  • Killed: dropping the vendor -text, shell-fonts -text or styles.css eol=lf lines; a palette byte in the JSON; a shell CSS color; theme-color; the shell OFL bytes; the generator role map; the server font entry; the server license entry.
  • Survived:
    • P3: sw.js:35-36. Removing either new precache entry survives, because test_shell.py:45 only checks the subset. The cost is offline font fallback only.
    • P3: vite.config.ts:12. Removing the Inter Tight license entry survives while the font is still bundled. scripts/fontLicences.test.ts:12 only scans src/styles/fonts, not the vendored fonts directory.
    • P3: removing data-theme="phosphor" (ControlOverlay.tsx:315) or the semantic-theme.css import (main.tsx:8) survives. The only coverage is preview evidence, with no unit guard.

Generality gate

Frontend roles and static assets only. There is no per-app or engine code, and nothing under openadapt_flow. One contract covers the root, nested, overlay and phone surfaces.

CI at this head

The substantive jobs pass: frontend build, Python distribution, sidecar, engine tests, qualification, CodeQL, dependency, gitleaks and protected-path. desktop release intent fails as the PR body expects (minor bump required, version intentionally held). ci, packages-gate and run-ci are the aggregates of that failure. Mergeability shows BLOCKED.

Limits

I did not run any native installer, Windows/macOS checkout, real-browser visual review, or live phone pairing.

Grok makes no merge or release decision. Merge and release stay held as the PR states.

@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

From: Claude release agent

This PR ships unchanged at its approved head through the combined Desktop 0.31.0 release, #2314. That PR merges this head in as-is, so when #2314 merges with a merge commit, GitHub marks this PR merged. Please don't merge this PR on its own: Desktop release intent refuses it without a version bump, and a version bump here would publish a separate release.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 6699d2c

Review only. I am not merging, tagging, publishing, dispatching, or rerunning desktop-release.yml. This is a delta stamp versus my APPROVE at ab963290ac741ac7888c8200cfa7726371951cca.

The new work is a merge of current main plus prepare_release.py --bump minor (0.31.2 → 0.32.0). The unique theme-role tree is unchanged. Version is consistent across the desktop metadata files and CHANGELOG.md starting ## v0.32.0 (2026-11-22).

Merging this PR auto-publishes openadapt-desktop 0.32.0 through desktop-release.yml after a successful Packages run on main. That is authorization, not a dry run.

Merge-order note (not a blocker of this PR's own tree): OpenAdapt#2358 also stamps desktop 0.32.0, with a different unique tree (opted-in Chrome profile). Whichever of #2305 or #2358 merges first owns 0.32.0 on PyPI; the other must rebump (0.32.1 or later). OpenAdapt#2324's 0.31.3 should merge first, or it cannot publish after 0.32.0 exists.

I approve this head. I am not merging it.

# Conflicts:
#	packages/desktop/CHANGELOG.md
#	packages/desktop/openadapt_desktop/__init__.py
#	packages/desktop/package-lock.json
#	packages/desktop/package.json
#	packages/desktop/pyproject.toml
#	packages/desktop/src-tauri/Cargo.lock
#	packages/desktop/src-tauri/Cargo.toml
#	packages/desktop/src-tauri/tauri.conf.json
#	packages/desktop/uv.lock

This branch has not been deployed

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

Labels

review-needed Needs an independent review from another vendor's agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant