fix(docs): render native block icons instead of the two-letter fallback - #5981
Conversation
The Table and Logs pages (and every other native resource block) showed a two-letter text fallback because the generated icon map never contained them. Four separate causes in scripts/generate-docs.ts: - The icon-map allowlist had drifted behind NATIVE_RESOURCE_BLOCK_TYPES, the set the docs writer uses. Key the exception off that set so the map cannot fall behind the pages that consume it. - extractIconNameFromContent only matched identifiers ending in `Icon`, so Logs (`icon: Library`) resolved to nothing. Match any identifier, excluding bare JS literals. - The map imported everything from `@/components/icons`, so an icon sourced from `@sim/emcn/icons` could not resolve. Imports are now grouped by the module each icon is actually imported from. - Trigger-only pages (slack_app, twilio) and hand-written pages (a2a) had no entry at all. Seed provider icons from the trigger definitions. Also fixes three regen bugs found while verifying the output: - A comment reading "this becomes `hideFromToolbar: true`" in slack.ts was matched as the property itself, so a clean regen dropped Slack from the integrations catalog and reduced slack.mdx to a 29-line stub. Property probes now run against comment-stripped source. - 16 hand-written *-service-account guides were unregistered, so the stale-doc cleanup deleted them on every regen. Registered them, and cleanup now refuses to delete any page holding MANUAL-CONTENT (this also restores the intros on file.mdx and twilio.mdx). - Trigger outputs referenced as a constant (`outputs: SLACK_TRIGGER_OUTPUTS`) resolved to nothing, dropping whole Output tables. Constants and sibling modules now resolve, which also restores 319 lines on clickup.mdx. Removes the language selector from the docs navbar. Regenerated docs are included; remaining content deltas are tool-definition drift since the last regen.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Generator safety fixes include comment-stripped property detection (so Slack isn’t dropped from the catalog), protecting pages with Docs chrome: the language selector was removed from the navbar ( Reviewed by Cursor Bugbot for commit 956c96f. Configure here. |
Greptile SummaryFixes documentation icon generation and preserves generated integration content more reliably.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the cleanup guard now requires extractable, nonempty manual content, so malformed or empty markers no longer pin stale generated pages.
|
| Filename | Overview |
|---|---|
| scripts/generate-docs.ts | Updates icon discovery, trigger output resolution, source parsing, manual-content preservation, and stale-document cleanup; the previously reported cleanup-marker issue is fixed. |
| apps/docs/components/ui/icon-mapping.ts | Regenerates documentation icon mappings with native and provider icons imported from their actual source modules. |
| apps/docs/components/navbar/navbar.tsx | Removes the language selector from the documentation navbar. |
| apps/sim/lib/integrations/integrations.json | Regenerates the integration catalog after correcting comment-sensitive property detection. |
Reviews (2): Last reviewed commit: "fix(docs): stop truncating quoted descri..." | Re-trigger Greptile
…naged_agent - slack_oauth is reachable only through the preview-gated slack_v2 block, so documenting it published an unreleased surface under its own slack_app page. Triggers whose every hosting block sets `preview: true` are now excluded from the docs and the icon map. Triggers no block claims are untouched, so standalone webhook providers keep their pages. - Adds the MANUAL-CONTENT intro to managed_agent.mdx, matching the other integration pages. Verified it survives a regen.
…uard
Review findings from round 1.
- parseSubBlockObject read string properties with a single `['"]…[^'"]+…['"]`
character class, which ends the match at the first quote of either kind. Any
description holding an apostrophe inside a double-quoted string was cut
mid-word ("Your app", "Found in your Zoom app"). Matches the opening quote to
its own closing quote now, reusing the alternation the tool-description
extractor already used. Restores full text across calendly, gmail,
google_sheets, hubspot, intercom, whatsapp, and zoom.
- The stale-doc cleanup guard tested for a bare `MANUAL-CONTENT-START`
substring, so a stray or unterminated marker would pin a stale page that has
nothing recoverable. It now gates on what extractManualContent actually
returns.
|
@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 956c96f. Configure here.
Summary
scripts/generate-docs.ts:NATIVE_RESOURCE_BLOCK_TYPES(the set the docs writer uses) — now keyed off that set so it can't fall behind againextractIconNameFromContentonly matched identifiers ending inIcon, so Logs (icon: Library) resolved to nothing@/components/icons, so an icon from@sim/emcn/iconscouldn't resolve — imports are now grouped by actual source moduleslack_app,twilio) and hand-written pages (a2a) had no entry — provider icons are now seeded from trigger definitionsthis becomes `hideFromToolbar: true`inslack.tswas matched as the property itself, so a clean regen dropped Slack from the integrations catalog and cutslack.mdxto a 29-line stub. Property probes now run against comment-stripped source*-service-accountguides were unregistered, so stale-doc cleanup deleted them on every regen. Registered them, and cleanup now refuses to delete any page holdingMANUAL-CONTENT(also restores the intros onfile.mdxandtwilio.mdx)outputs: SLACK_TRIGGER_OUTPUTS) resolved to nothing, dropping whole Output tables — constants and sibling modules now resolve (restores 319 lines onclickup.mdx)Type of Change
Testing
Tested manually. Verified by diffing generated output against a clean regen on
origin/staging: my output is a strict superset — no page loses content that the current generator would keep. Audited every<BlockInfoCard type=...>across all 264 integration pages; all now resolve to an icon (previouslytable,logs,deployments,slack,slack_app,twilio,a2afell through to the fallback).tscclean onapps/sim, biome clean,check:api-validationand monorepo-boundary checks pass. Docs-apptscerrors are pre-existing and identical on staging.Two notes for review:
brex+207,hubspot+292,gitlab+89,pipedrive+18,github,firecrawl,ashby) are tool-definition drift since the last regen, identical to a clean-baseline regen.jira.mdxis left at its committed content. A regen drops 126 lines of trigger Configuration tables becausebuildJiraExtraFieldsbuilds its array imperatively (push+ conditionals), which the regex extractor can't follow — the fields still exist in source, so deleting the tables would be wrong. Fixing it properly needs the generator to evaluate trigger modules rather than parse them; filed as follow-up rather than expanding this PR.Checklist