Skip to content

fix(docs): render native block icons instead of the two-letter fallback - #5981

Merged
waleedlatif1 merged 3 commits into
stagingfrom
worktree-docs-block-icons
Jul 27, 2026
Merged

fix(docs): render native block icons instead of the two-letter fallback#5981
waleedlatif1 merged 3 commits into
stagingfrom
worktree-docs-block-icons

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Native blocks (Table, Logs, Deployments) showed a two-letter text fallback instead of their icon — the generated icon map never contained them. Four causes in scripts/generate-docs.ts:
    • the icon-map allowlist had drifted behind NATIVE_RESOURCE_BLOCK_TYPES (the set the docs writer uses) — now keyed off that set so it can't fall behind again
    • extractIconNameFromContent only matched identifiers ending in Icon, so Logs (icon: Library) resolved to nothing
    • the map imported everything from @/components/icons, so an icon from @sim/emcn/icons couldn't resolve — imports are now grouped by actual source module
    • trigger-only pages (slack_app, twilio) and hand-written pages (a2a) had no entry — provider icons are now seeded from trigger definitions
  • Fixed 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 cut slack.mdx to a 29-line stub. Property probes now run against comment-stripped source
    • 16 hand-written *-service-account guides were unregistered, so stale-doc cleanup deleted them on every regen. Registered them, and cleanup now refuses to delete any page holding MANUAL-CONTENT (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 (restores 319 lines on clickup.mdx)
  • Removed the language selector from the docs navbar
  • Regenerated docs included

Type of Change

  • Bug fix

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 (previously table, logs, deployments, slack, slack_app, twilio, a2a fell through to the fallback). tsc clean on apps/sim, biome clean, check:api-validation and monorepo-boundary checks pass. Docs-app tsc errors are pre-existing and identical on staging.

Two notes for review:

  • Remaining content deltas (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.mdx is left at its committed content. A regen drops 126 lines of trigger Configuration tables because buildJiraExtraFields builds 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

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

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.
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 27, 2026 9:00pm

Request Review

@cursor

cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches the doc generation pipeline and bulk regenerated content; wrong generator logic could drop pages or icons, but changes are mostly docs/UI with no runtime auth or payment paths.

Overview
Docs integration pages now resolve real block icons instead of the two-letter fallback. The doc generator’s icon map is aligned with native resource blocks (table, logs, deployments, etc.), accepts non-Icon names (e.g. Logs → Library), imports icons from the correct module (@sim/emcn/icons vs @/components/icons), and seeds entries for trigger-only and hand-written providers. ClaudeIcon and KimiIcon were added; managed_agent maps to Claude and gets a new integration page.

Generator safety fixes include comment-stripped property detection (so Slack isn’t dropped from the catalog), protecting pages with MANUAL-CONTENT from stale cleanup, registering service-account guides, and resolving trigger output/constants so large trigger sections (e.g. ClickUp) regenerate correctly. Integrations meta.json drops separate service-account sections in favor of an alphabetical list that includes those pages plus managed_agent.

Docs chrome: the language selector was removed from the navbar (language-dropdown.tsx deleted). A large regenerated MDX pass updates integration reference content (notably Brex, HubSpot, GitLab, ClickUp triggers) and fixes truncated parameter descriptions across several integrations.

Reviewed by Cursor Bugbot for commit 956c96f. Configure here.

Comment thread scripts/generate-docs.ts
@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixes documentation icon generation and preserves generated integration content more reliably.

  • Builds the icon map from native resource types, actual icon source modules, and trigger-provider definitions.
  • Strips comments before probing integration properties and resolves trigger output constants from sibling modules.
  • Protects nonempty manual sections during stale-document cleanup and registers hand-written service-account guides.
  • Regenerates integration documentation and removes the navbar language selector.

Confidence Score: 5/5

The 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.

Important Files Changed

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

Comment thread scripts/generate-docs.ts Outdated
…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.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@waleedlatif1
waleedlatif1 merged commit 6d48444 into staging Jul 27, 2026
20 checks passed
@waleedlatif1
waleedlatif1 deleted the worktree-docs-block-icons branch July 27, 2026 21:07
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.

1 participant