Skip to content

fix(confluence): index text from Caelor Optics HTML macros - #10093

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/confluence-html-macro-text
Nov 16, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
fix/confluence-html-macro-text

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Pages built from a Caelor Optics HTML macro (Connect macro caelor-optics-entry, macro=html) synced as "Document contains no extractable text": the rendered view body holds the macro only as an iframe bootstrap script, which we strip, and the author's HTML lives in the macro's contentByMode parameter in the storage body
  • View path: when the rendered page names the Optics macro, or is left with no text but a Connect app container, fetch the storage body and append the macro's text. Other app pages with prose (draw.io, Lucidchart) don't pay the extra request
  • Extraction: visible text with script/style dropped, plus key: value records from object literals in inline scripts (pages that render their content from a JS data object show only a mount point otherwise). data: payloads and ternaries/case labels are excluded
  • Permission-scoped storage path: the Optics HTML macro is authored on the page, so it's indexed as local content instead of dropped as dynamic; other Optics modules stay dynamic
  • export_view rejected: Connect macros only render there if the app declares an export render mode
  • No content-hash bump (it would re-embed every Confluence page). Skipped view-path pages retry every sync, so Optics-only pages recover on the next sync; already-indexed pages that mix prose with an Optics macro, and scoped Optics-only skips, pick it up on their next edit

Type of Change

  • Bug fix

Testing

  • 8 new cases in connectors/confluence/confluence.test.ts at the fetch boundary; the behavior cases failed before the fix, and each half of the storage-fetch trigger was reverted to watch its guard go red
  • connectors/confluence/ (143) and lib/knowledge/connectors (487) vitest suites pass
  • ~690 KB macro with base64 images and a 126-record data object extracts in ~60 ms with no base64 or code in the output
  • biome, check:file-names, check:comment-hygiene, check:explicit-any, check:utils, check:organization-egress; full type-check and check:audits left to CI

Checklist

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

🤖 Generated with Claude Code

The rendered view body carries a Connect app macro only as an iframe
bootstrap script, so pages built from an Optics HTML macro synced with no
extractable text. Read the macro's authored HTML from the storage body:
visible text with scripts and styles dropped, plus the object-literal data
its inline scripts declare.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 16, 2026 8:43pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issue was found.

Summary

Adds searchable text from Caelor Optics HTML macros without executing their scripts.

  • Confluence indexes text authored inside Caelor Optics HTML macros.

All supplied previous threads were unnumbered, so none require entries in previousFindings. No new actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Read Confluence page] --> B{Permission-scoped?}
  B -->|Yes| C[Read authored storage text]
  B -->|No| D[Read rendered text]
  D --> E{May contain Optics?}
  E -->|Yes| F[Fetch storage and append Optics text]
  E -->|No| G[Return text]
  F --> G
  C --> G
Loading

Reviews (3) · Last reviewed commit: "fix(confluence): keep regex literals and..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 75334c3 into staging Nov 16, 2026
80 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/confluence-html-macro-text branch November 16, 2026 20:50

This branch was previously deployed

1 inactive deployment
Preview — 7bc5f7cf Deployed Nov 16, 2026 by vercel[bot]
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