Skip to content

fix(ui): separate Vertex and plugin OAuth card identity classes - #384

Open
framecy wants to merge 4 commits into
router-for-me:mainfrom
framecy:main
Open

framecy wants to merge 4 commits into
router-for-me:mainfrom
framecy:main

Conversation

@framecy

@framecy framecy commented Oct 10, 2026

Copy link
Copy Markdown

Summary

VertexLoginCard reuses the .oauth-card identity class, so the class no
longer identifies "a built-in OAuth provider card". Any test (or style) that
counts .oauth-card elements sees 8 cards instead of 7, and every future OAuth
provider would break it again.

This splits the three card sources into non-overlapping identity classes and
lets them share appearance through grouped selectors, so the visual result is
unchanged.

Classes after this patch

Source Identity class Shared appearance
ManagementPages.tsx built-ins .oauth-card .oauth-card, .vertex-login-card, .plugin-oauth-card
VertexLoginCard.tsx .vertex-login-card same group
PluginOAuthProviders.tsx .oauth-card.plugin-oauth-card same group

The plugin card keeps .oauth-card alongside .plugin-oauth-card because
PluginOAuthProviders.css has 15 rules keyed on it; keeping both classes means
zero visual change while still allowing exact selection via
.oauth-card:not(.plugin-oauth-card).

Why

On current main, two UI tests fail because the Vertex card inflates the count:

  • tests/meta-oauth-ui.cjs:39 — Meta should add a seventh OAuth card, 8 !== 7
  • tests/plugin-oauth-providers-ui.cjs:45 — seven built-ins plus two eligible plugin providers, 10 !== 9

Verification

Both tests, three consecutive runs each, same machine and same Vite server:

Version meta-oauth-ui.cjs plugin-oauth-providers-ui.cjs
6de1581 (unpatched) 0 / 3 pass (8 !== 7) 0 / 3 pass (10 !== 9)
this branch 3 / 3 pass 3 / 3 pass

Also confirmed no visual regression: the card keeps its height and the shared
selectors keep every rule that previously applied to .oauth-card applying to
the two new classes.

npx tsc --noEmit passes clean.

Testing notes

tests/vertex-login-ui.cjs is flaky on this machine independently of this
patch — it asserts focus order right after page.setViewportSize(), and on a
loaded machine the focus ring lands one element off. Measured on a pristine
6de1581 worktree with no patch applied: 1 failure in 6 runs. Strictly paired
A/B runs (same load, alternating) showed no difference between patched and
unpatched (7/12 vs 5/11). It is not caused by and not fixed by this patch; I
left it alone rather than mixing an unrelated fix into this PR.

Test file changes

  • tests/meta-oauth-ui.cjs, tests/devin-ui.cjs: assertions unchanged (they
    already expected 7); comments added noting .oauth-card now counts only
    built-in cards.
  • tests/plugin-oauth-providers-ui.cjs: locators rewritten from prefix
    matching on .oauth-card to role/title-based lookup, removing the ambiguity
    that made the plugin cards count as built-ins. Two
    waitForFunction(() => ... === 1) waits were relaxed to > 0 because the
    fixture legitimately triggers more than one list call around open(), which
    made the assertion surface as an unrelated timeout.

VertexLoginCard reused `.oauth-card`, so adding any new provider inflated the
`.oauth-card` count that several UI tests rely on to verify the built-in
provider list. The Vertex card and plugin provider cards now carry their own
classes (`.vertex-login-card`, `.plugin-oauth-card`) and the shared surface
rules were widened to cover all three, so the rendered appearance is unchanged.

plugin-oauth-providers-ui.cjs now counts built-in and plugin cards separately
and locates cards by their heading instead of matching the `.oauth-card` prefix,
which also removes the count-vs-timeout coupling in the two listCalls waits.
The tray reused the 1024px app icon, which the system scaled to 18pt as an
unreadable colored tile in the macOS menu bar.

Add dedicated tray artwork distilled from the app logo's concave diamond
frame, and serve it as a template image so macOS tints it for light and
dark menu bars and inverts it while the menu is open. Windows and Linux
notification areas do not support template images, so they get the same
mark in a mid-tone teal sized for a 16-32px tray slot.
Brings the fork from v0.3.29 up to upstream v0.3.46 (166 commits,
342 files). Bundled kernel moves 8.0.22 -> 8.0.34.

Highlights:
- Plugin system: plugin store, native-webview plugin pages, sidebar
  plugin nav with drag reordering, local plugin install, cancellable
  installs, GitHub rate-limit handling
- New theme system: token registry, six themes with light/dark slots
  and gradient backdrops, portaled ThemeSelector
- Privacy mode: render-time masking of emails/account and project IDs
- Kernel crash auto-recovery (max 3 restarts per 5 min) and staged
  kernel installs with rollback backups
- Codex: local session context editor, auto-approval model, remote
  compaction, openai provider switch
- VS Code Copilot and Copilot CLI agent support
- Sidebar redesign, position-based model alias identity, usage
  source/upstream rework

Conflict resolution: tests/plugin-oauth-providers-ui.cjs only. Kept the
fork's scoped builtInCards()/pluginCards() locators (which the Vertex
card's restored .oauth-card class made necessary) while adopting
upstream's new built-in card count of 8 and its >=1 listCalls waits.

The fork's tray template-icon fix (6f751a1) auto-merged intact:
tray.rs now carries both upstream's main_window() helper and the
.icon(MACOS_TRAY_ICON).icon_as_template(true) / .icon(DESKTOP_TRAY_ICON)
calls, so no manual re-application was required.

Verified: npm run check (tsc) clean, npm run build clean,
cargo check exits 0 (5 pre-existing upstream dead-code warnings in
native_i18n.rs, untouched by this merge).

Backup of the pre-merge state: tag pre-upstream-merge-20261020
The app version tracks Cargo.toml as its single source of truth and was
never bumped after the upstream merge, so builds still identified as
0.3.6 while carrying v0.3.46 code.

Also fixes DMG packaging: the kernel archive in cpa-core/ was still
8.0.22 while core-version.txt pointed at 8.0.34, and two platform-matching
archives made bundled_core_archive() bail out with "Multiple bundled
kernels match the current platform". Builds are now produced with
src-tauri/tauri.dmg.conf.json so the kernel archive, core-version.txt and
portable-app.json ship inside Contents/Resources, letting the app install
its bundled kernel offline instead of falling back to an adopted kernel.
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