Repository navigation
fix(settings): prevent mobile update status card overflow and overlap - #1277
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed.
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. |
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.
Summary
Fixes #1271.
Root Cause
In
packages/renderer-extension/src/settings/pages.ts,settings-update-panelapplieddata-inline=""wheneverresult.updateAvailablewas true and there was no error/actionable failure — even whenresult.status?.serviceStopOutputwas 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__headin column 1 (minmax(0, 1fr)),<pre class="settings-update-service-stop-output">in column 2 (auto), and.settings-update-actionsin row 2, column 1.On narrow mobile viewports (360px–430px), the monospace stop output claimed almost the entire card width in the
autocolumn, 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 enablepanel.dataset.inlinewhenresult.updateAvailable && result.installationAvailableand there is noerror,actionableStatus, orresult.status?.serviceStopOutput.packages/renderer-extension/src/settings/shell.css:.settings-update-panelwithgrid-template-columns: minmax(0, 1fr); min-width: 0;and tighten compact card padding to16pxunder@container codexhost-settings-page (max-width: 720px)..settings-update-panel[data-inline]to a wrapping flex row (flex-wrap: wrap,flex: 1 1 180pxon the head,flex: noneon actions, andflex: 1 0 100%; min-width: 0defensively on any extra child) so compact cards stay single-row when space permits and wrap cleanly without squishing titles or buttons on narrow screens..settings-update-panel__headicons to the first line (align-items: flex-start+margin-top: 3px) for multi-line headings, and ensuremin-width: 0/max-width: 100%on summary, error, and stop-output blocks.packages/renderer-extension/test/settings/pages.test.ts: Extend the existingserviceStopOutputandinstallationAvailable: falseupdate-page tests to assertpanel.dataset.inlineis not set.Validation
npx tsc -b packages/renderer-extension— passednpm run build:renderer— passednpx 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 passednpx prettier --checkon the 3 changed files — passed