Skip to content

Count a file's lines right in read_example/read_app; refuse a blank docs_search query - #57

Merged
oblomov-dev merged 2 commits into
mainfrom
claude/beautiful-turing-wxr303
Oct 11, 2026
Merged

oblomov-dev merged 2 commits into
mainfrom
claude/beautiful-turing-wxr303

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Round-4 bug fixes, found by calling the tools with edge inputs against real sibling checkouts. One commit per fix; both have their line in the (untagged) ## 1.0.0 section of CHANGELOG.md, under "Since the 1.0.0 section was first written", so the release workflow's "Unreleased is empty" gate stays satisfied.

  • read_example / read_app counted one line too many for every abapGit file. Every such file ends with a line break, and split('\n') read an empty line after it: lines was 385 for a 384-line class, and a from_line past the end answered source: "" under a pastEnd saying "its last line is shown". The paging tests wrote their fixtures without a final newline, so they never saw it. sourceLines() drops the break after the last line and puts it back on the page that ends the file, so the pages still join to the exact text. New test in test/paging.test.mjs (fails before the fix).
  • docs_search with a query of spaces searched for no term and answered a hint quoting the blanks; it is now refused like a missing query. A pitfalls miss under the default area read "nothing in the all catalogue"; it now says "either catalogue". Both pinned in the existing paging tests.

Checks: npm run check (server.json check + 563 tests) passes locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Te3BRpRpxNhZAYnrQL6Gdt


Generated by Claude Code

Every abapGit file ends with a line break, and split('\n') read an empty
line after it: `lines` was one too many, and a from_line past the end
answered an empty `source` under a pastEnd saying "its last line is
shown". The paging tests wrote their files without a final newline, so
they never saw it.

sourceLines() drops the break after the last line and puts it back on the
page that ends the file, so the pages still join to the file's exact text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Te3BRpRpxNhZAYnrQL6Gdt
docs_search took a query of spaces, searched for no term and answered "no
documentation page carries every term of \"   \""; it is now refused like
a missing query. A pitfalls miss under the default area read "nothing in
the all catalogue"; it says "either catalogue" there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Te3BRpRpxNhZAYnrQL6Gdt
@oblomov-dev
oblomov-dev merged commit 66ba755 into main Oct 11, 2026
3 checks passed
@oblomov-dev
oblomov-dev deleted the claude/beautiful-turing-wxr303 branch October 11, 2026 18:33
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.

2 participants