Skip to content

Document quote escaping and fix misleading regex-hint example - #156

Merged
shouze merged 4 commits into
fix/derive-segment-textfrom
docs/quote-escaping-regex-hint
Aug 23, 2026
Merged

Document quote escaping and fix misleading regex-hint example#156
shouze merged 4 commits into
fix/derive-segment-textfrom
docs/quote-escaping-regex-hint

Conversation

@shouze

@shouze shouze commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Closes #150.

Adds a new "Searching for a literal quote character" section to docs/usage/search-syntax.md explaining GitHub's double-escaping syntax (shell and GitHub), the difference between balanced and unbalanced raw quotes, and the local validation error introduced by #149.

Replaces the --regex-hint '"axios"' example: wrapping a single word in double quotes has zero filtering effect on GitHub's side (verified against the live API, quoting a single word returns the exact same total_count as the bare word), so the example was actively misleading. The new example uses a pattern with no literal characters at all, which genuinely requires a manual hint.

Updates the semver/version-audit use case on the vitepress landing page (docs/.vitepress/theme/UseCaseTabs.vue) to note that the double quotes in the pattern are now preserved and escaped automatically instead of being dropped (see #147); this landing-page example previously demonstrated a command that, before this epic's fixes, did not actually behave as advertised.

How did you verify your code works?

  • Verified every command shown as an example against the live GitHub API.
  • Ran bun run docs:build locally; build completes successfully.
  • Ran lint, format check and knip; all green.

@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

95.96%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.72%100%100%94.04%335–339, 400, 417, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.37%100%100%99.32%315
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown

🔦 Lighthouse Report

Page ⚡ Perf ♿ A11y 🛡️ BP 🔍 SEO Report
/github-code-search/ 🟢 98 (≥97) 🟢 100 (≥99) 🟢 100 (≥99) 🟢 100 (≥99) 🔗 view
/github-code-search/getting-started/ 🟢 99 (≥97) 🟢 100 (≥99) 🟢 100 (≥99) 🟢 100 (≥99) 🔗 view

Thresholds: Perf ≥ 97 · A11y ≥ 99 · BP ≥ 99 · SEO ≥ 99
commit cf05367 · full workflow run

@shouze shouze changed the title docs/quote escaping regex hint Document quote escaping and fix misleading regex-hint example Aug 23, 2026
@shouze
shouze force-pushed the docs/quote-escaping-regex-hint branch from 953e512 to d33ee36 Compare August 23, 2026 13:58
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

95.96%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.72%100%100%94.04%335–339, 400, 417, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.37%100%100%99.32%320
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

95.96%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.72%100%100%94.04%335–339, 400, 417, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.37%100%100%99.32%320
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

@shouze
shouze marked this pull request as ready for review August 23, 2026 14:07
Copilot AI lite review requested due to automatic review settings August 23, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the documentation to accurately explain GitHub quote escaping (including the CLI’s fast-fail behavior for unbalanced quotes) and replaces a misleading --regex-hint example with one that actually needs a manual hint. It also updates the VitePress landing-page “Semver / version audit” use case copy to reflect the improved quote-preserving behavior for regex-derived API terms.

Changes:

  • Expand docs/usage/search-syntax.md with a new section covering literal " searches, double-escaping (shell + GitHub), and the unbalanced-quote 422 troubleshooting flow.
  • Replace the --regex-hint '"axios"' example with a non-literal regex example that genuinely requires a hint, plus a tip explaining why single-word quoting doesn’t narrow GitHub search.
  • Update the landing-page “Semver / version audit” use case description to mention automatic escaping of quotes in regex patterns.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/usage/search-syntax.md Adds/adjusts documentation for literal quote escaping, quote-balance troubleshooting, and a corrected --regex-hint example.
docs/.vitepress/theme/UseCaseTabs.vue Updates the Semver/version-audit use case description to match the improved quote-preserving behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/usage/search-syntax.md Outdated
Comment thread docs/usage/search-syntax.md Outdated
@shouze
shouze force-pushed the docs/quote-escaping-regex-hint branch from d33ee36 to 0033268 Compare August 23, 2026 14:26
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

95.96%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.72%100%100%94.04%335–339, 400, 417, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.37%100%100%99.32%320
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

95.96%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.72%100%100%94.04%335–339, 400, 417, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.37%100%100%99.32%320
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

@shouze
shouze force-pushed the docs/quote-escaping-regex-hint branch from 0033268 to 270dc31 Compare August 23, 2026 14:36
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

95.97%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.72%100%100%94.04%335–339, 400, 417, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

95.97%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.72%100%100%94.04%335–339, 400, 417, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

shouze added 2 commits August 23, 2026 16:51
- Add a new "Searching for a literal quote character" section to
  docs/usage/search-syntax.md explaining GitHub's double-escaping syntax
  (shell + GitHub), the difference between balanced and unbalanced raw
  quotes, and the new local validation error introduced by #149.
- Replace the --regex-hint '"axios"' example: wrapping a single word in
  quotes has zero filtering effect on GitHub's side (verified against the
  live API), so it was actively misleading. The new example uses a pattern
  with no literal characters at all, which genuinely requires a hint.
- Update the semver/version-audit example note that the double quotes in
  the pattern are now preserved and escaped automatically instead of being
  dropped (see #147) — this vitepress landing-page use case previously
  demonstrated a command that, before this epic's fixes, did not actually
  behave as advertised.

Closes #150
@shouze
shouze force-pushed the docs/quote-escaping-regex-hint branch from 270dc31 to 0322340 Compare August 23, 2026 14:51
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

96.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

96.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Sébastien HOUZÉ <sebastien.houze@fulll.fr>
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

96.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Sébastien HOUZÉ <sebastien.houze@fulll.fr>
@github-actions

Copy link
Copy Markdown

Coverage after merging docs/quote-escaping-regex-hint into fix/derive-segment-text will be

96.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.74%100%100%94.07%340–344, 405, 422, 63–69
   cache.ts94.67%100%100%94.29%139–141, 39
   completions.ts99.42%100%100%99.37%270
   group.ts99.50%100%97.44%100%
   output.ts99.29%100%95.65%99.61%80
   regex.ts99.39%100%100%99.34%329
   render.ts89.87%100%89.47%89.89%167, 191–196, 198–200, 202–203, 254–255, 276, 463–464, 487–489, 555–559, 571–572, 577–584, 586–594, 596–597
   upgrade.ts88.38%100%94.44%87.89%128, 131, 133, 153, 167–168, 188–195, 198–204, 209, 214, 250–253
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.63%100%90.40%99.31%284–285
   rows.ts97.58%100%100%97.44%168, 54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%
   team-pick.ts100%100%100%100%

@shouze
shouze merged commit c8695fd into main Aug 23, 2026
8 checks passed
@shouze
shouze deleted the docs/quote-escaping-regex-hint branch August 23, 2026 15:00
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.

Documentation is incorrect or incomplete regarding quote escaping and regex-hint effectiveness

2 participants