Skip to content

docs(reference): fix non-compiling examples and DocC symbol links (Batch 4)#60

Merged
clintecker merged 1 commit into
mainfrom
docs/audit-batch4-examples
Jul 21, 2026
Merged

docs(reference): fix non-compiling examples and DocC symbol links (Batch 4)#60
clintecker merged 1 commit into
mainfrom
docs/audit-batch4-examples

Conversation

@clintecker

@clintecker clintecker commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Batch 4 of the doc-accuracy audit. Closes #55. Each verified against code:

  • F9 — DocC links → real symbols: image(source:theme:spacing:), attachmentString(source:theme:spacing:).
  • F14DiagramScene.from(_:) requires measure: (verified DiagramScene+Flowchart.swift:12).
  • F16 — render cache key is (source, theme, spacing), not (source, appearance) (DiagramRenderer.swift:370).
  • F17NSColor(hex:) doesn't exist; added a hex convenience so the brand-theme example compiles.
  • F20diagram(source:format:) is private (MermaidRenderer.swift:141); removed from the CHANGELOG's caller-facing list.
  • F25effectiveAppearance.isDark doesn't exist; use bestMatch(from: [.aqua, .darkAqua]) == .darkAqua.

Docs-only.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

…tch 4)

Batch 4 of the documentation-accuracy audit (#55).

- F9: DocC symbol links resolved to nonexistent symbols — image(source:theme:)
  -> image(source:theme:spacing:) (MermaidRender.docc) and
  attachmentString(source:theme:) -> ...(source:theme:spacing:)
  (EmbeddingInTextViews.docc).
- F14: AddingADiagramType scene-lowering signature missing the required measure:
  parameter (real: DiagramScene.from(_:measure:)).
- F16: MermaidRender.docc said the render cache is keyed per (source, appearance);
  the real RenderKey is (source, theme, spacing).
- F17: Theming.docc used a nonexistent NSColor(hex:) initializer; added a small
  NSColor hex convenience so the brand-theme example compiles.
- F20: CHANGELOG 2.2.0 listed diagram(source:format:) among caller-facing entry
  points, but it is private — dropped it (the public entry points remain).
- F25: GettingStarted used view.effectiveAppearance.isDark (no such property);
  use bestMatch(from: [.aqua, .darkAqua]) == .darkAqua.

Closes #55.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_014CJYAapHgDn2PWGNABnFtv
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2ce7e2f5-243c-4803-a733-f67f0206d348

📥 Commits

Reviewing files that changed from the base of the PR and between b5aabb0 and bee87d2.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • Sources/MermaidLayout/MermaidLayout.docc/AddingADiagramType.md
  • Sources/MermaidRender/MermaidRender.docc/EmbeddingInTextViews.md
  • Sources/MermaidRender/MermaidRender.docc/GettingStarted.md
  • Sources/MermaidRender/MermaidRender.docc/MermaidRender.md
  • Sources/MermaidRender/MermaidRender.docc/Theming.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/audit-batch4-examples

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bee87d2ac8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- ``MermaidView`` — a SwiftUI view: give it Mermaid source, it renders.
- ``MermaidRenderer/image(source:theme:)`` — one call, one native image.
- ``MermaidRenderer/image(source:theme:spacing:)`` — one call, one native image.
- ``MermaidRenderer/attachmentString(source:theme:)`` — the diagram as a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the stale attachmentString DocC link

When the reference docs are built with DocC symbol-link validation, this bullet still points at MermaidRenderer/attachmentString(source:theme:), but the public overload includes the spacing label (attachmentString(source:theme:spacing:) in MermaidRenderer.swift). Since this batch updates the neighboring image link for the same reason, leaving this stale link means the MermaidRender overview can still fail or warn on unresolved symbols.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bee87d2ac8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- ``MermaidView`` — a SwiftUI view: give it Mermaid source, it renders.
- ``MermaidRenderer/image(source:theme:)`` — one call, one native image.
- ``MermaidRenderer/image(source:theme:spacing:)`` — one call, one native image.
- ``MermaidRenderer/attachmentString(source:theme:)`` — the diagram as a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the stale attachmentString DocC link

When the reference docs are built with DocC symbol-link validation, this bullet still points at MermaidRenderer/attachmentString(source:theme:), but the public overload includes the spacing label (attachmentString(source:theme:spacing:) in MermaidRenderer.swift). Since this batch updates the neighboring image link for the same reason, leaving this stale link means the MermaidRender overview can still fail or warn on unresolved symbols.

Useful? React with 👍 / 👎.

@clintecker
clintecker merged commit 9b73f14 into main Jul 21, 2026
15 checks passed
@clintecker
clintecker deleted the docs/audit-batch4-examples branch July 21, 2026 19:09
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.

Docs audit · Batch 4: fix non-compiling examples and DocC symbol links

1 participant