Skip to content

fix(settings): prevent mobile update status card overflow and overlap - #1277

Merged
iruriQ merged 1 commit into
mainfrom
fix/issue-1271
Nov 27, 2026
Merged

iruriQ merged 1 commit into
mainfrom
fix/issue-1271

Conversation

@iruriQ

@iruriQ iruriQ commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #1271.

Root Cause

In packages/renderer-extension/src/settings/pages.ts, settings-update-panel applied data-inline="" whenever result.updateAvailable was true and there was no error/actionable failure — even when result.status?.serviceStopOutput was also rendered as a third child (or when no install button was rendered).

Because .settings-update-panel[data-inline] used a rigid two-column grid (grid-template-columns: minmax(0, 1fr) auto), the three-child card placed:

  • .settings-update-panel__head in column 1 (minmax(0, 1fr)),
  • <pre class="settings-update-service-stop-output"> in column 2 (auto), and
  • .settings-update-actions in row 2, column 1.

On narrow mobile viewports (360px–430px), the monospace stop output claimed almost the entire card width in the auto column, crushing column 1 to ~20px — causing the title to wrap one character per line, overlap the log text, and clip the primary update button.

Changes

  • packages/renderer-extension/src/settings/pages.ts: Only enable panel.dataset.inline when result.updateAvailable && result.installationAvailable and there is no error, actionableStatus, or result.status?.serviceStopOutput.
  • packages/renderer-extension/src/settings/shell.css:
    • Constrain .settings-update-panel with grid-template-columns: minmax(0, 1fr); min-width: 0; and tighten compact card padding to 16px under @container codexhost-settings-page (max-width: 720px).
    • Convert .settings-update-panel[data-inline] to a wrapping flex row (flex-wrap: wrap, flex: 1 1 180px on the head, flex: none on actions, and flex: 1 0 100%; min-width: 0 defensively on any extra child) so compact cards stay single-row when space permits and wrap cleanly without squishing titles or buttons on narrow screens.
    • Align .settings-update-panel__head icons to the first line (align-items: flex-start + margin-top: 3px) for multi-line headings, and ensure min-width: 0 / max-width: 100% on summary, error, and stop-output blocks.
  • packages/renderer-extension/test/settings/pages.test.ts: Extend the existing serviceStopOutput and installationAvailable: false update-page tests to assert panel.dataset.inline is not set.

Validation

  • npx tsc -b packages/renderer-extension — passed
  • npm run build:renderer — passed
  • npx vitest run --config tests/vitest.config.js packages/renderer-extension/test/settings/pages.test.ts packages/renderer-extension/test/settings/update-recovery.test.ts — 2 files, 136 tests passed
  • npx prettier --check on the 3 changed files — passed
  • Captured and visually inspected rendered headless Chrome screenshots using the built settings styles across mobile 375px (light & dark themes) and desktop 820px (light theme), verifying all update card states (available + stop output, inline available ZH/EN, failed + long URL + error + retry, waiting for npm registry) render with zero horizontal overflow, zero overlap, single-line horizontal titles, and unclipped buttons.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@iruriQ
iruriQ merged commit 2aaa497 into main Nov 27, 2026
5 of 8 checks passed
@iruriQ
iruriQ deleted the fix/issue-1271 branch November 27, 2026 01:11
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.

[Bug] 移动端窄屏下「设置 → 更新」状态卡片布局挤爆:标题竖排、日志重叠、更新按钮被裁切

2 participants