Skip to content

🐛 fix: Edit/Source/Issue links for hive pages authored in this repo - #536

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-533
Oct 31, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-533

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Why: the source-link fallback assumed every hive page has an upstream twin in hivecommons/hive; six (macos, governor, agent-definition-yaml, variable-substitution, spektacular-runs, agent-terminal) do not, so Compose a PR / View Source 404'd and Open Issue pre-filled a bad path. Pages without a 'Synced from' banner now point at this repo's docs/content, mirroring the general-section branch. A test pins the edit/blob/issue URLs for a locally authored hive page.

Closes #533

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify

netlify Bot commented Oct 31, 2026

Copy link
Copy Markdown

❌ Deploy Preview for hivecommons-docs failed. Why did it fail? →

Name Link
🔨 Latest commit ab618e6
🔍 Latest deploy log https://app.netlify.com/projects/hivecommons-docs/deploys/6ae54e204044b2bcab1607ae

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read this against the tree rather than just the diff — looks correct to me.

  • getPageContent (src/app/docs/[...slug]/page.tsx:184-213) only ever returns a filePath relative to getContentPath(projectId), and for projectId === 'hive' that is docs/content/hive (page-map.ts:11-33), so the new fallback URL docs/content/${projectId ?? 'hive'}/${filePath} points at the file that was actually read.
  • The projectId === undefined case (getProjectFromSlug, page.tsx:268-278) can only resolve general-section files today — docs/content/ has no top-level .md files — and those are already caught by the isGeneralSectionFile branch above, so the ?? 'hive' default is never reached for a non-hive path.
  • grep -L "Synced from" docs/content/hive/*.md gives exactly the six pages the body names plus integrations.md, which also benefits.

The only red checks are the Netlify preview/header/redirect rules; I did not look into those.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Looks correct to me — read the tree at ab618e6, not just the diff.

  • getContentPath() returns docs/content/<project> for every project id (src/app/docs/page-map.ts:11-30), so the new fallback at src/app/docs/[...slug]/page.tsx:323 reconstructs exactly the path readLocalFile resolved from.
  • The shared-root fallback in readLocalFile (page.tsx:159-170) can only hit contributing/, community/, news/ — and those are already caught by the isGeneralSectionFile branch at page.tsx:318, so the ${projectId}/ prefix is never applied to a root-level file.
  • DocsSourceActions prefers editUrlFromSource(sourceUrl) over buildGitHubEditUrl (src/components/docs/DocsSourceActions.tsx:104-106), so passing a defined sourceUrl is sufficient to redirect all three links; the new test pins that.

One note for the body: grep -L 'Synced from' docs/content/hive finds seven non-synced pages, not six — integrations.md is also covered by this fallback (it exists in this repo, so the new URL is correct for it too). No other project directory has non-synced pages, so the change is a no-op for them.

@hivecommons-hive
hivecommons-hive Bot merged commit 6d63684 into main Oct 31, 2026
7 of 12 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-533 branch October 31, 2026 02:28
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#536ab618e6` sha256:ba99cdfdbbb6ffb877a0c8e87b64331860be5c41a39cb119e3940a8a2ec55fea — download from the dashboard or `hivectl review evidence #536`.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026
hivecommons-hive Bot added a commit that referenced this pull request Oct 31, 2026
)

#536 changed the source-link fallback in DocPage, but its only test drove
DocsSourceActions with a hand-supplied URL, so reverting page.tsx leaves the
suite green. Render /docs/hive/governor (no 'Synced from' banner) through the
route and assert the View Source / Compose a PR targets, alongside a synced
page that must keep its upstream URL.

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] Edit/Source/Issue links 404 for Hive pages authored in this repo (no synced source)

0 participants