Skip to content

fix(upstreams): undo layout squeezed only to avoid a scrollbar - #321

Merged
fylorn merged 2 commits into
devfrom
fix/upstream-dialog-breathing
Oct 11, 2026
Merged

fylorn merged 2 commits into
devfrom
fix/upstream-dialog-breathing

Conversation

@fylorn

@fylorn fylorn commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

#319 and #320 made every step of the New/Edit upstream dialog fit the default 1100×720 window with no scrollbar, including the steps with many settings. That rule is meant for steps with few options and a lot of empty space, which should be tidied to fit. Steps with many settings may scroll: the dialog keeps its fixed height and its body scrolls when the content is taller. This PR puts back the natural layout wherever options were crammed into columns, descriptions dropped, or results moved into hovers only to avoid a scrollbar.

The approved redesign is unchanged: 4-column service tiles with the search beside the steps, auth rows per service, Advanced settings collapsed by default and expanded when something in it is set, Check on Next when creating (result row on Models), the two sign-in method cards, the Z.ai method | site row, the account summary rows and the import host note.

Reverted squeezes

  • Edit dialog, Check connection: back in the Connection section body, at the end, with the full result and the balance written out below the button (as before 2026.10.15: fit the new-upstream wizard on one screen #319). It was in the footer, with the details truncated to one line and the full text in a hover. Creating still checks on Next.
  • Advanced settings, expanded: one column in natural order instead of two columns: headers full width (with their hint), Forward client identity with its description, then the short fields two per row: when the proxy is unavailable, concurrency limit (with its description again), and for Custom the balance source as a normal labelled field (it was an inline label beside a 160px select).
  • Address row: base URL full width with its description; protocol and region share the next row. 2026.10.15: fit the new-upstream wizard on one screen #319 had put URL (2/3) and protocol (1/3) in one row and shortened the English "Auto-detect (not detected, forwarded as is)" to "Auto-detect (pass-through)" to fit the narrow column. The original wording is back.
  • AWS access keys: two columns, then the session token on its own row with its description, instead of three narrow columns.
  • OAuth: two columns, then the access token on its own row with its description, instead of a three-column row.
  • ChatGPT account page: name and egress in two columns with the concurrency limit below (and its description), then usage limits above reset credits, with the page's gap-5. 2026.10.15: fit the new-upstream wizard on one screen #319 had put name, egress and concurrency in a 3-column row and quota and credits side by side.
  • Descriptions removed for space, restored as worded before, in both languages: base URL (no endpoint path), headers (${变量名} reads an environment variable), session token (only temporary credentials have one), OAuth access token (used only to check before saving), egress on the ChatGPT account page. The Z.ai "requests go to …" line and the name hint stay removed.
  • Z.ai sign-in notice "the key obtained is stored in the config file … and managed with the other upstreams" is back. The ChatGPT equivalent had been kept; the Z.ai step still fits in one screen.
  • Device code warning: the full sentence "…never enter a device code provided by someone else" is back on its own line. It had been cut to "Enter only the device code shown here" so it would fit at the end of the status line.
  • Import link: the dialog no longer grows by the note's height (noteHeight style override and the ResizeObserver removed); the note takes its space from the body, which scrolls if needed. Long host names wrap instead of being truncated.
  • Spacing: the Connection and Account steps, and OAuth, are back at the form's gap-4 (2026.10.15: fit the new-upstream wizard on one screen #319 had 3.5); the price sheet rows on Billing are back at py-2.5. The import link's new-sheet row wraps its detail and its error ("name taken") instead of truncating them.
  • Doc comments: the "一屏放下" comments in UpstreamDialog, ModelsSection, ManualModelInput and BillingSection now state the corrected rule.

Checked and kept

  • Step 1 (4-column tiles, shorter English blurbs, tighter group spacing): a few-options step, part of the approved design.
  • Models step toolbar and the model and price tables scrolling in their own boxes: list steps; the box keeps a minimum height and the body scrolls below that.
  • The "Copy link" hint stays in a tooltip on the sign-in card. That tooltip is part of the approved card design, and showing the hint in the card pushes the English ChatGPT sign-in step past one screen.

Verification

  • pnpm typecheck, pnpm test (108 files, 1192 tests).
  • Preview harness at 1100×720, zh and en, light: step 1, OpenAI key step, ChatGPT and Z.ai sign-in and device code (all fit without scrolling); edit relay-hk (advanced expanded, scrolls; check result with balance at the bottom); edit anthropic with a check result (fits); new Custom + OAuth with advanced open (scrolls); ChatGPT account edit (scrolls); import links with the host note, the plain-http line, two hosts and a new price sheet. The dialog stays 634px high in every case, including import links.

🤖 Generated with Claude Code

fylorn and others added 2 commits October 11, 2026 21:54
#319 and #320 made every step of the upstream dialog fit 1100x720 without
a scrollbar, including the steps with many settings. That rule was meant
for steps with few options and a lot of empty space. Steps with many
settings may scroll: the dialog keeps its fixed height and its body
scrolls. Options crammed into columns, descriptions dropped and results
moved into hovers only to save a few rows go back to their natural form.
The approved redesign stays (service tiles and search, auth rows, Advanced
settings collapsed unless set, Check on Next when creating, sign-in cards,
account summary rows, the import host note).

- Edit dialog: Check connection is back in the Connection section body,
  with the full result and the balance below it, not in the footer with
  the details in a hover.
- Advanced settings, expanded: headers full width, then Forward client
  identity with its description, then the short fields two per row
  (proxy unavailable, concurrency limit with its description, and the
  balance source for Custom as a normal labelled field).
- Connection: the base URL is full width again, protocol and region share
  the next row; AWS access keys and OAuth go back to two columns with the
  session token and access token on their own rows; the English
  "Auto-detect (not detected, forwarded as is)" that was shortened for the
  narrow protocol column is back. Spacing back to the form's gap-4.
- Descriptions restored, as worded before: base URL, headers (${NAME}),
  session token, OAuth access token, and the egress note on the ChatGPT
  account page; also the Z.ai key-storage notice and the full device code
  warning, which had been cut to fit one line.
- ChatGPT account page: name and egress in two columns with the
  concurrency limit below, usage limits above reset credits, gap-5.
- Import link: the dialog no longer grows by the note's height; the note
  takes its space from the body, and long host names wrap instead of being
  cut off.
- Billing: the price sheet rows keep their normal padding, and the import
  link's new-sheet row wraps its detail and its error instead of
  truncating them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user approved that row in the design; a step with few fields does
not need the extra line, and the base URL hint still sits under the
address. The undetected label stays short for the narrower column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn merged commit d735574 into dev Oct 11, 2026
5 checks passed
@fylorn
fylorn deleted the fix/upstream-dialog-breathing branch October 11, 2026 14:04
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