fix(integrations): repair corrupt icons, backfill missing block metas, restore scroll on back-nav#5342
Conversation
…, restore scroll on back-nav - Restore 7 brand icons (Google, Outlook, MongoDB, Postgres, OpenRouter, Groq, Cerebras) whose SVG path data was corrupted by a past bulk reformat, flooding the integrations page console with <path> parse errors; add a check:icon-paths CI gate that validates every icon d attribute (operand counts + arc flags). - Backfill BlockMeta (tags/url/templates/skills) for postgresql, mysql, ssh, sftp, smtp — previously catalog integrations with empty detail pages; add an integration meta-coverage CI check so every catalog block must have a meta. - Add scroll-position restoration for the integrations index/detail inner scroll containers so browser Back returns to where you were. - Remove the error digest pill from the shared workspace ErrorShell (kept in logs, dropped from UI).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview Catalog integrations Integrations list and detail pages use The workspace Reviewed by Cursor Bugbot for commit 757e568. Configure here. |
Greptile SummaryThis PR addresses three independent regressions on the integrations surface: corrupted SVG path data in seven brand icons, empty integration detail pages for five blocks lacking
Confidence Score: 5/5Safe to merge. All three regressions (corrupted icons, empty detail pages, lost scroll position) are addressed with targeted fixes, each backed by a new CI check that prevents recurrence. The icon path restorations are verified by the new check:icon-paths validator. The block meta additions follow the established pattern and are enforced by the extended check-block-registry guard. The scroll-restoration hook is well-reasoned, addresses the known race conditions raised in prior review threads, and the ready-flag late-retry path is logically sound. The only gap is that the docs icons file is not covered by the new CI guard, but this does not affect runtime correctness of the main app. scripts/check-icon-paths.ts — the default target covers only apps/sim/components/icons.tsx; apps/docs/components/icons.tsx is not validated. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Browser
participant ModuleScope as Module (use-scroll-restoration)
participant LayoutEffect as useLayoutEffect
participant ScrollEffect as useEffect (scroll)
participant SessionStorage
Browser->>ModuleScope: popstate event (Back/Forward)
ModuleScope->>ModuleScope: "lastNavWasTraversal = true"
Note over Browser: Page mounts
LayoutEffect->>ModuleScope: read lastNavWasTraversal (true)
LayoutEffect->>ModuleScope: "clear lastNavWasTraversal = false"
LayoutEffect->>SessionStorage: getItem(storageKey)
SessionStorage-->>LayoutEffect: saved scrollTop
LayoutEffect->>Browser: "el.scrollTop = savedValue (lastAppliedRef set)"
ScrollEffect->>Browser: addEventListener('scroll', onScroll)
Browser->>ScrollEffect: user scroll event
ScrollEffect->>ScrollEffect: "scrollTop !== lastAppliedRef → user scroll"
ScrollEffect->>ScrollEffect: latestUserScrollRef updated, RAF enqueued
ScrollEffect->>SessionStorage: setItem(storageKey, newScrollTop)
Note over Browser: Page unmounts
ScrollEffect->>SessionStorage: flush latestUserScrollRef (final persist)
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Browser
participant ModuleScope as Module (use-scroll-restoration)
participant LayoutEffect as useLayoutEffect
participant ScrollEffect as useEffect (scroll)
participant SessionStorage
Browser->>ModuleScope: popstate event (Back/Forward)
ModuleScope->>ModuleScope: "lastNavWasTraversal = true"
Note over Browser: Page mounts
LayoutEffect->>ModuleScope: read lastNavWasTraversal (true)
LayoutEffect->>ModuleScope: "clear lastNavWasTraversal = false"
LayoutEffect->>SessionStorage: getItem(storageKey)
SessionStorage-->>LayoutEffect: saved scrollTop
LayoutEffect->>Browser: "el.scrollTop = savedValue (lastAppliedRef set)"
ScrollEffect->>Browser: addEventListener('scroll', onScroll)
Browser->>ScrollEffect: user scroll event
ScrollEffect->>ScrollEffect: "scrollTop !== lastAppliedRef → user scroll"
ScrollEffect->>ScrollEffect: latestUserScrollRef updated, RAF enqueued
ScrollEffect->>SessionStorage: setItem(storageKey, newScrollTop)
Note over Browser: Page unmounts
ScrollEffect->>SessionStorage: flush latestUserScrollRef (final persist)
Reviews (4): Last reviewed commit: "fix(ci): attribute icon-path errors for ..." | Re-trigger Greptile |
…detection + Back/Forward-only gate Addresses review: replace the racy programmatic-scroll flag with value comparison (a restore's echo equals lastApplied and is ignored, so a stuck flag can never drop the first user scroll or overwrite the saved target), and gate restoration on popstate history traversals so fresh push navigations open at the top instead of jumping mid-list. TSDoc-only comments.
|
@cursor review |
Greptile review: iconNameAt only matched 'export function', so a malformed path inside an 'export const XxxIcon = (...)' arrow-function icon would be misattributed to the preceding function-declared icon. Match both forms (mirrors check-bare-icons indexIconBodies).
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 757e568. Configure here.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 757e568. Configure here.
Summary
dpath data was mangled by a past bulk icon reformat — this was flooding the integrations page with dozens of<path> attribute dconsole errors. Geometry restored byte-for-byte from the pre-corruption commit.check:icon-paths: validates every icondattribute incomponents/icons.tsx(operand counts + arc flags) so malformed path data can never silently ship again.BlockMeta(tags/url/templates/skills) forpostgresql,mysql,ssh,sftp,smtp— these were catalog integrations rendering empty detail pages (no templates/skills). Content web-validated against each service's real operations.category: 'tools', not hidden) must now have aBlockMeta, enforced incheck-block-registry.ts.overflow-y-autocontainer, which Next.js doesn't restore on Back. Added auseScrollRestorationhook (sessionStorage, per-pathname) so Back returns to your prior scroll position.digestbadge from the shared workspaceErrorShell(still logged, just not shown in the UI).Type of Change
Testing
Tested manually. All CI guards pass locally (
check:icon-paths,check:block-registrymeta coverage,check:bare-icons);tscclean on changed files; biome clean; error-boundary test passes. Icon-path validator confirmed to catch the historical corruption and accept valid packed arc-flag syntax.Checklist