Skip to content

fix(report): markdown lists every page that carries a broken link #837 - #1343

Closed
nc9 wants to merge 1 commit into
mainfrom
fix/837-broken-link-sources
Closed

nc9 wants to merge 1 commit into
mainfrom
fix/837-broken-link-sources

Conversation

@nc9

@nc9 nc9 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #837

Most of #837 was already on main (each source page once with its link count and section, "found on 3 pages" summary, no "see full list above", per-renderer tests in item-sources-837.test.ts). Checked again on a fixture: /a links /missing twice (body and footer), /b once, /c once gives from: /a (2 links, in the page content and the footer).

The remaining gap was AC4: a list over three sources said "+N more pages" with no way to see the rest in markdown. Markdown now lists every source (the item sits in a collapsed block); text, console and llm keep the three-page preview with the count, html already expands in place. Test updated (6 sources, all listed, no "more pages", no "see full list"). docs/reports.mdx markdown section describes it. packages/report tsgo and make validate pass.

Skill (squirrelscan/skills): no change needed. CHANGELOG under Unreleased / Fixed.

Text, console and llm keep the 3-page preview with the count; markdown and html show the full list (html expands in place).

@nc9
nc9 marked this pull request as ready for review October 30, 2026 08:03
@claude

claude Bot commented Oct 30, 2026

Copy link
Copy Markdown

Reviewed the diff. The change is small and scoped: Markdown now lists every row from itemSourceView, and the "+N more pages" line only appears for sources the report never recorded. Rows are capped upstream (maxSourcePagesPerItem 100 locally, 10 published), so the Markdown size stays bounded.

  • (nit) packages/report/src/output/markdown.ts:736: the comment says the item "sits in a collapsed block". That holds for GitHub rendering but not for every Markdown viewer. Consider saying "usually collapsed".
  • (nit) The count comment in item-source-rows-a11y-837.test.ts ("10 listed, 3 shown") now only describes the text renderer. Adding a short note that Markdown shows all 10 would help future readers.

Test coverage looks good: the updated tests assert that all rows are present and that "more pages" is absent, plus the published-report case (+30). I couldn't run the suite here, since the shell is read-only. No high or critical findings.

🤖 Generated with Claude Code

@claude

claude Bot commented Oct 30, 2026

Copy link
Copy Markdown

Review of #1343: the change is small and does what the changelog says. The only things I found are two low-severity points.

  • (low) packages/report/src/output/markdown.ts:736: the loop now emits one line per view.rows entry with no cap. I did not trace how many rows the item-source view can hold for a site-controlled item, so I could not confirm an upper bound. A broken link on thousands of pages would give a very long Markdown block. The rows are already deduplicated per page, so this is probably acceptable. If the view has no cap, add a hard limit such as REPORT_PAGES_HARD_CAP (already imported in this file) and fall back to the "+N more pages" line.
  • (low) The new Markdown tests cover the six-page and published (10 listed plus 30 unlisted) cases. Neither test shows the unbounded path, so a test with a much larger row count would pin whatever cap you choose.
  • (nit) docs/reports.mdx: the added sentence is long. Splitting it in two would read better.

The CHANGELOG entry, the docs update and the revised tests are consistent with each other. I did not run the tests.

@nc9

nc9 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Landed in v0.0.144 as 77593cfc d3b89d15 via #1356. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.144. Closing this original.

nik

@nc9 nc9 closed this Oct 30, 2026
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.

Broken links report: say which pages carry the link and where, no duplicate sources

1 participant