Skip to content

feat: add docs search support#74

Merged
sirily11 merged 1 commit into
mainfrom
account
May 31, 2026
Merged

feat: add docs search support#74
sirily11 merged 1 commit into
mainfrom
account

Conversation

@sirily11
Copy link
Copy Markdown
Contributor

@sirily11 sirily11 commented May 31, 2026

This pull request adds native support for documentation indexing, search, and setup in the app, integrating with the external docs service (github-pm's docs API). It introduces new models, workflow automation, and user interface hooks to streamline documentation publishing and discovery. The changes also add deep link handling and new backend capabilities to expose these features to agents and the UI.

Documentation Integration and Models:

  • Added a comprehensive set of Codable models in DocsModels.swift to represent repositories, documents, search results, upload tokens, and related API contracts for the docs service.

Backend and Tooling Enhancements:

  • Introduced a new backend capability .docsSearch in BackendCapability.swift, allowing backends to declare support for native documentation search and suppress the polyfill.
  • Registered two new IDE tools in IDEToolRegistry.swift: ide__search_docs for semantic search over published docs, and ide__setup_docs_secret for automating setup of the docs upload token as a GitHub Actions secret.

App State and UI Integration:

  • Extended AppState to track per-repo docs status, manage docs setup requests, and provide high-level intents for refreshing and querying docs status. [1] [2] [3] [4]
  • Updated deep link handling in RxCodeApp.swift to support docs setup links, triggering the appropriate UI flow when a docs setup deep link is opened. [1] [2] [3]

Workflow Automation:

  • Added a new GitHub Actions workflow .github/workflows/upload-docs.yaml to automate uploading documentation to the docs service whenever relevant files change on the main branch.

Hook and Service Integration:

  • Registered the new DocsHook in the app's hook manager for macOS, and extended the HookController protocol to support checking docs indexing status and handling pending docs setup skill injection. [1] [2]

Copilot AI review requested due to automatic review settings May 31, 2026 19:32
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

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

Project Deployment Actions Updated (UTC)
rxcode Ready Ready Preview, Comment May 31, 2026 7:32pm

Request Review

@autopilot-project-manager autopilot-project-manager Bot added documentation Improvements or additions to documentation enhancement New feature or request labels May 31, 2026
@sirily11 sirily11 enabled auto-merge (squash) May 31, 2026 19:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds “docs search” support to RxCode by introducing a CI-friendly docs uploader script and extending the macOS app UI to surface docs setup/management entry points and to include docs results in global (⌘K) search.

Changes:

  • Add scripts/upload_docs.py to collect markdown docs with slug frontmatter and upload them to the docs service in batches.
  • Add a “Set Up Docs Search” action in the project sidebar menu and a “Manage Docs” entry in Autopilot settings.
  • Extend the global search overlay to search both threads (on-device) and docs (network) with filter tabs and a docs detail sheet.

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 3 comments.

File Description
scripts/upload_docs.py New stdlib-only uploader to batch POST docs content to the docs indexing service.
RxCode/Views/Sidebar/ProjectTreeView.swift Adds a sidebar menu item to kick off docs-search setup via deep link.
RxCode/Views/Settings/AutopilotSettingsTab.swift Adds a Documentation section and “Manage Docs” sheet entry point.
RxCode/Views/Search/GlobalSearchOverlay.swift Integrates docs results into ⌘K global search with tabs, selection, and detail presentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +268 to +272
onSetupDocsSearch: {
guard let repo = project.gitHubRepo,
let url = DocsDeepLink.setupURL(repo: repo) else { return }
openURL(url)
},
Comment thread scripts/upload_docs.py
req = urllib.request.Request(url, data=data, method="POST")
req.add_header("Content-Type", "application/json")
req.add_header("Authorization", "Bearer " + token)
with urllib.request.urlopen(req) as resp:
Comment on lines +42 to +45
/// Docs results live alongside threads in a single, unified result list —
/// one query searches on-device threads and github-pm's docs index at once,
/// with no scope to pick.
@State private var docsHits: [DocsSearchHit] = []
@sirily11 sirily11 merged commit bc0298c into main May 31, 2026
14 checks passed
@sirily11 sirily11 deleted the account branch May 31, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants