fix(gui): stop the rollback journal from flooding the Integrations page - #3050
fix(gui): stop the rollback journal from flooding the Integrations page#3050lidge-jun wants to merge 1 commit into
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe integrations UI now uses a shared, paginated rollback history component. Both integration surfaces show loading, failure, empty, and populated states. Restore dialogs use native modal behavior with focus restoration. New labels are localized across supported languages. ChangesIntegrations rollback history
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR improves rollback-history presentation, request-state messaging, confirmation-dialog behavior, and heading structure without changing backend behavior or deployment configuration; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant IntegrationSurface
participant historyResource
participant RollbackHistory
participant RestoreDialog
historyResource->>IntegrationSurface: provide history state
IntegrationSurface->>RollbackHistory: pass populated rows and onRestore
RollbackHistory-->>IntegrationSurface: render newest and paginated older rows
RollbackHistory->>RestoreDialog: invoke restore for selected row
RestoreDialog->>RestoreDialog: open modal and manage focus
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Title checkExplanation The title clearly describes the primary change: preventing the rollback journal from overwhelming the Integrations page by collapsing older operations. It is concise, specific, and consistent with the pull request objectives.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
리뷰 · 우선순위 57 / 80설명 이 PR은 Integrations 페이지의 롤백 기록이 화면을 덮는 문제를 고친다. 지금 베이스는 새 컴포넌트 지금 아홉 로케일에 경로 gui/src/pages/integrations/RollbackHistory.tsx newest - 첫 줄 메인테이너의 판단이 필요한 지점
너의 추천 CI가 초록이면 이 댓글은 grok-bot이 작성했습니다 |
f979d17 to
f60e64c
Compare
…urfaces The overview showed the global journal and every client tab showed the same journal filtered, both mapping the whole response into individually bordered rows. The route caps at 50 and keeps 10 restorable snapshots per client, so a user with a few dozen toggles behind them got fifty loose strips stacked under the real controls, twice, and most of them could not be undone. The newest row stays visible because it is the one a user reaches for after a mistake. The rest collapse behind a disclosure and reveal six at a time, the page size ClaudeDesktop's lane already uses. Rows now share one container boundary with border-top separators, which is what removes the stacked-strip texture. No total is displayed: the payload carries neither a total nor a hasMore, so any number would be a claim we cannot support. Three things were fixed alongside it, all in the same rendering path: - Cold, failed and empty rendered identically, because `data ?? []` collapses all three. A user whose journal request failed was told they had no history; they now get a skeleton, an error with retry, or the empty state. - RestoreDialog rendered `<dialog open>`, which is non-modal: the page behind a confirmation that overwrites a file stayed focusable, and an inline full-screen style block faked the backdrop. It now uses ConsequenceDialog's modal lifecycle. - The overview outline went h2 straight to h4, so every card title was an orphan level. An h3 owns the client catalog and rollback is its sibling. integrations.catalog.title joins the French intentional-English allowlist: "Clients" is the same word in French, and fr-localization's accidental-English guard is right to ask. Verification: bun run typecheck and bun run lint:gui clean; the full GUI suite runs 1119 pass / 0 fail; rendered against a live proxy with a seeded 30-row journal, the served DOM carries exactly one history row outside the disclosure, six inside it and a "Show 6 more" control, and measured child geometry at 390px and 320px wraps to three lines with no child overflowing its row.
f60e64c to
b5b491b
Compare
Summary
Stops the rollback journal from swamping both Integrations surfaces.
The overview rendered the global journal and every client tab rendered the same journal filtered, and both mapped the entire response into individually bordered rows. The route caps at 50 rows (
listOperationsdefault) and keeps 10 restorable snapshots per client, so a user with a few dozen toggles behind them got fifty loose strips stacked under the real controls, twice — and most of them could not be undone anyway.Three changes fix it:
LANE_PAGEinclaude-desktop-lane.ts.border-topseparators instead of a border and radius each. That texture was the actual visual complaint.hasMore, so any number shown would be a claim the response cannot support.The older rows are folded rather than dropped: the overview is the only surface showing one chronology across clients, since each client tab reads its own filtered journal.
Three defects in the same rendering path are fixed alongside it:
data ?? []collapses all three into an empty array and the empty state followed. A user whose journal request failed was told they had no history. They now get a skeleton while cold, an error with a retry while failed, and the empty state only when the response really is empty.RestoreDialogrendered<dialog open>, which is non-modal: the page behind a confirmation that is about to overwrite a config file stayed focusable and in the accessibility tree, and an inline full-screen style block existed only to fake the backdrop the modal state provides for free. It now usesConsequenceDialog's lifecycle —showModal(), backdrop dismiss,role="document", focus restore.h3now owns the client catalog and rollback is its sibling:H2:Integrations → H3:Clients → H4:…cards… → H3:Rollback center, verified in the live DOM.Collapsed, with a 30-row journal seeded on a live proxy:
Expanded:
At 390px:
Verification
bun run typecheck— cleanbun run lint:gui— cleancd gui && bun test tests/integrations-rollback-history.test.tsx— 7 pass (new file)cd gui && bun test tests/integrations-surfaces.test.tsx— 23 pass, including a new populated-overview casecd gui && bun test tests/locale-parity.test.ts tests/i18n-locales.test.ts tests/consequence-dialog.test.tsx— pass; the four new keys are present in all nine locales with placeholders preserved.integration-history-rowoutside the disclosure, six inside it, and aShow 6 morecontrol. Measured child geometry at 390px and 320px shows the row wrapping to three lines with negativeoverflowRighton every child, so nothing clips.The full suite runs in CI rather than locally, per the maintainer guidance for scoped changes.
Checklist
Summary by CodeRabbit
New Features
Localization
Style