Skip to content

fix(generate): normalise crawl URLs + TUI docs on homepage and getting-started#166

Merged
lewta merged 1 commit into
mainfrom
fix/generate-url-normalize-and-docs
Mar 24, 2026
Merged

fix(generate): normalise crawl URLs + TUI docs on homepage and getting-started#166
lewta merged 1 commit into
mainfrom
fix/generate-url-normalize-and-docs

Conversation

@lewta

@lewta lewta commented Mar 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bug fix: sendit generate --url was producing duplicate targets for trailing-slash variants (e.g. https://example.com/page and https://example.com/page/ both appeared). Added normalizeCrawlURL which strips fragments, query strings, and trailing slashes from non-root paths before deduplication — applied in both extractLinks and at the seed URL.
  • Docs homepage (_index.md): added a "Terminal UI" section at the top with an example dashboard block so the feature is visible before the section table.
  • Getting started (getting-started.md): added "Run with the terminal UI" section with example --tui output, positioned between "Run" and "Run with Docker".

Test plan

  • sendit generate --url https://golang.org --depth 1 produces no trailing-slash duplicates
  • All tests pass
  • Docs site renders the new TUI sections correctly

🤖 Generated with Claude Code

…cates

The crawl dedup map used raw href strings, so https://example.com/page
and https://example.com/page/ were treated as distinct targets. This
produced duplicate entries in generated configs for sites like
golang.org where both forms appear as hrefs on the same page.

normalizeCrawlURL now strips fragments, query strings, and trailing
slashes from non-root paths before inserting into the visited set and
before returning links from extractLinks. Root paths are kept as "/".

Also: docs homepage and getting-started now include the --tui dashboard
with an example output block so the feature is visible up front.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lewta lewta merged commit 4218617 into main Mar 24, 2026
12 checks passed
@lewta lewta deleted the fix/generate-url-normalize-and-docs branch March 24, 2026 23:36
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