Skip to content

[BOUNTY #5906] Dynamic Sitemap (Apps & Plugins)#11

Open
zhaog100 wants to merge 2 commits into
ubiquity:mainfrom
zhaog100:feat/dynamic-sitemap
Open

[BOUNTY #5906] Dynamic Sitemap (Apps & Plugins)#11
zhaog100 wants to merge 2 commits into
ubiquity:mainfrom
zhaog100:feat/dynamic-sitemap

Conversation

@zhaog100

Copy link
Copy Markdown

Summary

Added /sitemap.xml and /sitemap.json endpoints to the UBQ.FI router for search engine indexing and system interoperability.

Endpoints

Endpoint Content-Type Cache
/sitemap.xml application/xml 1 hour
/sitemap.json application/json 1 hour

Data Sources

  • Apps (static): root, www, pay, work, dashboard, docs
  • Plugins (dynamic): fetched from ubiquity-os-marketplace GitHub org on each request

JSON Format

{
  "version": "1.0.0",
  "generated": "2026-03-20T...",
  "generator": "ubq-fi-router",
  "base_url": "https://ubq.fi",
  "apps": [...],
  "plugins": [...],
  "total": N
}

Closes #2 (linked from devpool-directory #5906)

Dynamically generates sitemaps for all UBQ.FI apps and plugins.

- /sitemap.xml: Standard XML sitemap for search engines
- /sitemap.json: Machine-readable JSON index for interop

Apps (static): root, www, pay, work, dashboard, docs
Plugins (dynamic): fetched from ubiquity-os-marketplace GitHub org

Both endpoints cached for 1 hour (Cache-Control).

Closes ubiquity#2 (linked from devpool-directory #5906)
@coderabbitai

coderabbitai Bot commented Mar 20, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@zhaog100 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fcae854c-669c-4dfb-88b4-589e3289f9dd

📥 Commits

Reviewing files that changed from the base of the PR and between 9c9c3f4 and 631a23c.

📒 Files selected for processing (2)
  • src/sitemap.ts
  • src/worker.ts
📝 Walkthrough

Walkthrough

This pull request adds a sitemap generation system spanning two modules. The src/sitemap.ts module creates a sitemap builder that fetches plugin repositories from the GitHub API and generates sitemap entries for both applications and plugins. It exports a buildSitemap() function returning XML and JSON sitemap formats with metadata. The src/worker.ts module integrates this by adding route handlers for /sitemap.xml and /sitemap.json, applying appropriate content types and cache control headers, with error handling that logs failures and returns HTTP 500 responses.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title '[BOUNTY #5906] Dynamic Sitemap (Apps & Plugins)' clearly summarizes the main change: adding dynamic sitemap functionality for both applications and plugins.
Description check ✅ Passed The description is well-related to the changeset, detailing the new endpoints, data sources, cache behavior, and JSON format, all of which match the actual code changes.
Linked Issues check ✅ Passed The PR fully satisfies issue #2 requirements: it compiles apps/plugins into XML and JSON sitemaps, with status verification via GitHub API, enabling interoperability.
Out of Scope Changes check ✅ Passed All changes are scoped to sitemap generation: new module for building sitemaps and worker route handlers for serving them; no unrelated modifications present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
src/sitemap.ts (1)

101-101: Unused i parameter.

-    pluginEntries = pluginNames.map((name, i) => ({
+    pluginEntries = pluginNames.map((name) => ({

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e8ecdc60-e472-4554-9a2d-635b288e4563

📥 Commits

Reviewing files that changed from the base of the PR and between a2634c5 and 9c9c3f4.

📒 Files selected for processing (2)
  • src/sitemap.ts
  • src/worker.ts

Comment thread src/sitemap.ts Outdated
Comment thread src/sitemap.ts Outdated
Comment thread src/sitemap.ts Outdated
Comment thread src/sitemap.ts Outdated
Comment thread src/worker.ts
- Add pagination to GitHub API (handles >100 repos)
- Add GITHUB_TOKEN support for authenticated requests (5000/hour)
- Remove duplicate daemon-xp from exclusion list
- Propagate token from Worker env through to API calls

Addresses CodeRabbit review feedback on ubiquity#11.
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.

Dynamic Sitemap (Apps & Plugins)

1 participant