Skip to content

Render GitHub repository sources as one browse URL - #77

Merged
djradon merged 3 commits into
mainfrom
lane/repository-source-single-url
Sep 11, 2026
Merged

djradon merged 3 commits into
mainfrom
lane/repository-source-single-url

Conversation

@djradon

@djradon djradon commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Repository-backed payload pages already omit the duplicate Working File row. This changes the Repository Source presentation from a repository link plus unlinked path fragments to one safe GitHub blob/HEAD file URL.\n\nThe RDF locator remains structured, unsafe URLs remain escaped and unlinked, and exact release identity remains on HistoricalState.\n\nValidation: 942 tests, deno task check, deno task lint.

Summary by CodeRabbit

  • New Features

    • Repository-backed pages now show a single clickable GitHub link to the source file at blob/HEAD/<path>.
    • The link reflects the floating working source while preserving exact release identity in historical state details.
    • Resource summaries now link configured history labels to their corresponding history pages.
    • Invalid or non-GitHub repository references continue to display the repository URL and file path without a link.
  • Documentation

    • Added guidance explaining repository source links and their relationship to working and historical sources.

- keep repository-backed payload pages free of a duplicate Working File row\n- derive one safe blob/HEAD browse link from GitHub floating locators\n- preserve escaped non-link fallback for unsafe repository URLs\n- document the distinction between floating working source and exact state
@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5a41bea3-82d2-4312-a6c2-4be42c794126

📥 Commits

Reviewing files that changed from the base of the PR and between 3a7eca9 and a6b1fec.

📒 Files selected for processing (4)
  • src/core/weave/resource_page_models.ts
  • src/runtime/weave/page_model_assembly.ts
  • src/runtime/weave/pages.ts
  • tests/integration/weave_test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Resource pages now link matching artifact history labels in summaries and render safe GitHub repository sources as single blob/HEAD/<path> links. Unsupported repository references retain the existing fallback. Tests and documentation cover both behaviors.

Changes

Resource page links

Layer / File(s) Summary
History summary links
src/core/weave/resource_page_models.ts, src/runtime/weave/pages.ts, src/runtime/weave/page_model_assembly.ts
Resource page models support optional summary links. Simple resource pages link matching history labels and render escaped summary text.
GitHub locator validation and rendering
src/runtime/weave/pages.ts
The renderer validates GitHub repository URLs, rejects unsafe components, URI-encodes file paths, and creates /blob/HEAD/ links. Unsupported inputs use the existing fallback.
Locator behavior coverage and documentation
src/runtime/weave/pages_test.ts, tests/integration/weave_test.ts, documentation/notes/wu.resource-pages.md
Unit and integration expectations cover history summary links and single floating repository links. The documentation describes the blob/HEAD/<path> behavior and HistoricalState identity.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to a6b1f

Repository-backed resource pages now provide safe single-file GitHub source links and linked history labels while preserving fallback rendering for unsupported locators. The covered behavior introduces no current merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: rendering GitHub repository sources as a single browse URL.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lane/repository-source-single-url

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.

@codecov

codecov Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.54217% with 12 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/runtime/weave/pages.ts 85.18% 9 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

- render possessive apostrophes for named ArtifactHistory labels\n- cover the releases history summary in integration output
Render the named ArtifactHistory label in generated HistoricalState summaries as a safe internal link while keeping all surrounding summary text escaped. Use the history name attributively without a possessive apostrophe and cover the release-history output in integration tests.
@djradon
djradon merged commit 226d819 into main Sep 11, 2026
7 checks passed
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