PR-MODEL-ROW-AND-OAUTH-EMAIL-FIX-0: 2 of 6 bug bundle (height-clip + email-leak) - #373
Merged
Merged
Conversation
…b / 77221a77)
Two of WAWQAQ's screenshots flagged 6 issues. This PR ships the 2 with
clean root causes (1 CSS + 1 backend); 4 others split out per scope:
### Bug 1 fixed: model-row second line clipped (1 of 4 model-list bugs)
`.modelTableRow` is a `Button` primitive whose default `size="md"` ships
`h-9` (36px fixed). Each row now has TWO text lines (display name + raw
id when `showRawId`), so the second line's lower descender got clipped
("gpt-5.4" → "ant 5.4" in the screenshot). Override on the recipe:
height: auto;
min-height: 44px;
padding: 8px 10px; /* was 4px 8px */
This also resolves the apparent "middle row has a different background"
bug — the user just hovered/focused that row; with the taller row it
reads as expected hover state, not a separate visual.
### Bug 6 fixed: OAuth display name leaks user email
`apps/desktop/src/main/main.ts` was constructing the connection display
name as `Claude OAuth · ${state.profile.email}` (and the symmetric Codex
path). That value is persisted as `connection.name` and surfaces in
every model picker, settings dropdown, account list, and capability
audit — anywhere the connection is identified by name.
The email belongs on the Account · 模型 page, not in model identity.
Both paths now use brand-only labels:
const displayName = 'Claude OAuth';
const displayName = 'Codex OAuth';
The email is still available via the OAuth state for the dedicated
account surfaces that legitimately need it. Existing stored connections
will refresh to the brand-only name on next sync.
### NOT in this PR — split out for scope
- **Bug 5 (default-model dropdown lacks model selection)** — requires a
new IPC contract (`setDefault({slug, model})` vs current slug-only),
plus rewiring `GeneralDefaultsCard` onto the grouped `Select` pattern
that `ChatModelSwitcher` already uses. Separate backend-touching PR.
- **Bug 3 (row title truncation not matching second-line truncation)**
— `.modelTableRowId` already has `overflow:hidden + text-overflow:
ellipsis` per current CSS; the screenshot's apparent mismatch was the
same height-clip as bug 1 misread as horizontal truncation. Fixed
transitively by the bug-1 height fix.
- **Bug 4 ("mint refresh button" misattributed to PR #329 L3)** — PR
#329's L3 commit was not merged (only the vibrancy unblock from L1
shipped via `7d008d51`). The sage-green refresh button is the
existing `Button variant="default"` rendering `--primary`, unchanged.
No fix needed.
### Tests
`tsc --noEmit` clean against my edits. The two pre-existing errors
(`displayName` in `model-catalog-choices.test.ts` and
`recordActiveFullCompactBlock` in `main.ts:888`) also fail on `main`
without my changes; unrelated to this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
WAWQAQ msg
c71b4dcband77221a77flagged 6 issues across 2 screenshots in Settings → 模型 / 默认模型. After @maka-审美专家's analysis we split them into root-cause buckets:Buttonsize="md"ships fixedh-9; rows now have 2 linesoverflow:hidden + text-overflow:ellipsis; visible artifact was bug 1 height-clip misread--primarytoken unchangedsetDefault({slug, model})IPC + GeneralDefaultsCard rewire onto grouped Selectconnection.namebuilt asCodex OAuth · ${state.email}at the sourceWhat's fixed in this PR
Bug 1: model row second line clipped (1 of 4 model-list bugs)
.modelTableRowis aButtonrecipe whose defaultsize="md"shipsh-9(36px fixed). Each row now has TWO text lines (display name + raw id whenshowRawId), so the second line's lower descender got clipped ("gpt-5.4" → "ant 5.4" in the screenshot). Recipe override:This also resolves bug 2 (the apparent "middle row has a different background" is just the focused/hovered state on the taller row, reading as expected behavior with the height fixed) and bug 3 (
.modelTableRowIdalready had truncation; the visible mismatch was the same height clip misread).Bug 6: OAuth display name leaks user email
apps/desktop/src/main/main.ts:347and:402were building the connection display name asClaude OAuth · ${state.profile.email}(and the symmetric Codex path). That value is persisted asconnection.nameand surfaces in every model picker, settings dropdown, account list, and capability audit — anywhere the connection is identified by name. The email belongs on the Account · 模型 page, not in the model identity. Both paths now use brand-only labels.What's deferred
Bug 5 — separate PR
GeneralDefaultsCardcurrently shows ONLY connection options (e.g., "Claude OAuth", "Codex OAuth"); WAWQAQ wants the dropdown to also let the user pick a specific model within that connection. The fix requires:setDefault({slug, model})(vs currentsetDefault(slug))GeneralDefaultsCardonto the groupedSelectpattern thatChatModelSwitcheralready uses (packages/ui/src/chat-model-switcher.tsx)This is a backend-touching change with its own contract scope. Filing as a separate PR per scope discipline.
Bug 4 — misdiagnosed
The aesthetics expert's bug 4 claim ("mint button is PR #329 L3's fault") doesn't hold: PR #329 L3 commit
023b90b2was NEVER merged (only the L1 vibrancy unblock from7d008d51shipped). The sage-green refresh button is the existingButton variant="default"rendering--primary, unchanged for weeks. No fix needed.Tests
tsc --noEmitclean against my edits. Two pre-existing TS errors (displayNameinmodel-catalog-choices.test.tsandrecordActiveFullCompactBlockinmain.ts:888) also fail onmainwithout my changes; unrelated.Pure-CSS height change + main-process string-literal change; no JSX/IPC surface changes.