fix: make search output compact and scannable - #317
Merged
Conversation
Project the backend partialResults boolean into initial and stored status result envelopes so consumers can distinguish interim snapshots from partial evidence. Keep progress-only responses snapshot-free and cover both boolean values across all result-bearing paths.
Project lifecycle, availability, trust, source readiness, bounded alternatives, warnings, and primary actions from structured search payloads. Keep the projection pure and free of renderer prose, ANSI styling, and backend calls.
Retain completed mutable-evidence continuations, contributor source identities, and the ordered applicable rewrite pivots in the shared presentation projection. Keep the model data-only and preserve conservative suppression for limited evidence.
Keep requested, fresh, served, and freshness identities for every progress target while excluding internal diagnostics and alternative arrays. Preserve completed mutable-evidence continuations and ordered applicable rewrite pivots in the shared model.
Include the disclosed pending code source in the n8n presentation fixture and assert grouped readiness for code and documentation contributors.
Render search and search-status text from the shared lifecycle, availability, trust, source, alternative, and action projection. Keep hit anatomy and the CLI helper exports while removing duplicated MCP lifecycle prose.
Update tool and parity expectations for additive partialResults, and enforce concise outcome-first MCP search text with action-contained references in smoke coverage.
Make the smoke invariant catch either legacy search header spelling regardless of trailing whitespace.
Keep suggested site targets as bounded presentation facts with safe retry actions, and retain source identity and target context when grouping readiness. Consolidate alternative bounding in the shared model and remove redundant renderer projection machinery.
Record the in-place text-v1 evolution policy, MCP search lifecycle and action hierarchy, and additive partial-result JSON parity. Add the Phase 1a patch fragment for both public artifacts while keeping CLI human output documented as unchanged.
Route source readiness, indexed alternatives, and site recovery facts through the existing bounded text wrapper while preserving exact identifiers. Make the shared presentation projection authoritative for pagination so initial and stored status renderers cannot disagree about more results.
Preserve parser warnings from initial progress-only queries and use canonical site URL paths before site keys in MCP text. Align permanent documentation with the current in-place text contract and MCP source identity fallback.
Remove the unused legacy unified-search trailer and its private-only helpers after the MCP presentation migration. Keep exported CLI helpers and correct the remaining lint findings.
Map symbol source-status entries to the code readiness group so MCP output reflects the evidence taxonomy. Add presentation and text regressions for the exact symbol source shape.
Classify unknown source states conservatively, avoid unsupported single-target claims, and deduplicate stale evidence. Keep neutral documentation labels, remove dead text helpers, and separate hit blocks from follow-up actions.
Reduce duplicate snapshot, identity, coverage, constraint, alternative, and action plumbing while preserving source-state safety, provenance distinctions, trust deduplication, and multi-target behavior.
Keep served target attribution for stale hits, package context for lone documentation contributors, and deduplicated site-suggestion groups. Use an exhaustive contributor-state mapping and keep renderer internals private.
Remove the unrequested alternative Map rewrite and retain the established array merge while preserving the typed contributor mapping and search-target fixes.
Replace the overloaded source context field with an explicit searched target so provenance identity and package attribution remain distinct across source readiness and result headlines.
Classify divergent hit snapshots as stale evidence while indexing, and avoid repeating standalone site identities when target context already names them.
Use exact undecorated source identities when deciding multi-target suffixes, preserving disambiguation for code and distinct documentation provenance.
Bring the search output plan in line with the verified Phase 1a implementation, evidence, review decisions, and remaining Phase 1b and Phase 2 work.
Update the search output plan with merged-main test, build, package, smoke, and production-delta evidence while preserving the completed Phase 1a and pending Phase 1b/2 status.
Route CLI search and search-status through the shared outcome-first renderer with ANSI and command-dialect options. Remove the duplicated CLI formatter and keep CLI follow-up actions directly executable.
Document CLI as the inspectable MCP text harness, update the single-formatter ownership boundary, and mark the CLI search-output phase implemented in the existing patch fragment.
Assert outcome-first search text, hide internal lifecycle metadata, and require CLI-native follow-up actions in the live product smoke.
Render executable CLI pagination flags while preserving MCP parameter syntax, and remove the obsolete formatter helpers left behind by the shared-renderer migration.
Unit-test the live CLI search smoke predicate, reject MCP pagination syntax, and document pagination as an intentional surface-native difference.
Keep the structural smoke strict while allowing completed-empty and terminal responses that provide an explicit next action.
Record the final test, smoke, package-validation, size, and retained review evidence for the completed CLI/MCP formatter increment.
…put-refresh # Conflicts: # docs/implementation/tools.md
Update final verification, package-version, delta-size, and conflict-resolution evidence after integrating the current main branch.
Render CLI and MCP search status through target-centric blocks with compact session actions. Preserve exact aliases for grouping and strengthen smoke coverage for the shared hierarchy.
Keep requested targets distinct across shared aliases, attach readiness by exact requested identity, and always render a positive action for limited empty results. Normalize freshness in presentation and tighten CLI/MCP smoke symmetry.
Render status only from explicit freshness, preserve contributor identities in alias matching, and resolve ambiguous source rows by unique requested target. Document the resulting status and recovery anatomy.
Use the shared formatter's width option for CLI output, simplify available-source wording, and render versionless alternatives as refs.
Keep named refs ahead of unmapped commit identifiers in bounded search alternatives and align CLI smoke validation and parity documentation with the Available now wording and terminal-aware wrapping.
Keep CLI and MCP text-v1 on one shared formatter while restoring ranked, human-readable result anatomy. Collapse ordinary completed provenance and pagination without changing JSON locators or readiness detail.
Keep pagination on non-final snapshots, attribute multi-target docs, disclose unavailable human locators, and preserve long exact tokens without exposing opaque IDs.
Keep the shared CLI and MCP unified-search text contract readable across clients while preserving Unicode returned by the backend.
Keep the formatter separator assertion scoped to exact headers so backend-owned punctuation remains lossless.
Render every unified-search hit with locator-first, type-tagged, title-last anatomy. Keep documentation page IDs and readable source URLs in shared CLI/MCP text so docs_read follow-ups remain actionable, and align smoke validators and durable output docs with the contract.
Update direct CLI consumer coverage for the shared locator-first search grammar, including documentation page IDs, scheme-free source URLs, ranked repo-code headers, and ANSI output.
Clarify that formatter-authored search punctuation is ASCII across both pipe and hyphen separators while backend payload Unicode remains unchanged.
Keep fixed hit locators intact while wrapping only long title tails, and restore semantic ANSI emphasis for locators and title matches. Align result breakdown labels and document unavailable repository locations so CLI and MCP output remain consistent.
Accept the shared formatter's wrapped title tails in both CLI and MCP smoke validators while keeping locator metadata and unavailable-field checks strict.
Teach both CLI and MCP smoke validators to recognize repository hit headers whose title continues on indented lines, and cover repository-only wrapped result pages.
jlitola
marked this pull request as ready for review
August 28, 2026 09:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
text-v1formatter for search and search-statusdocs_readandcode_readUser-visible outcome
Indexing with no ready results becomes:
A live Express query now starts:
At wider terminal widths, a fitting title stays on the locator line. At narrower widths, only the free-form title tail wraps; page IDs, targets, paths, ranges, and URLs remain intact. A docs title may contain
|or-without changing the fixed field boundaries.Architecture
unified-search-presentation.tsowns transport-neutral target grouping and readiness semantics.unified-search-text.tsowns shared wording, ranking, locator anatomy, provenance, pagination, ANSI hierarchy, and wrapping. CLI and MCP supply color capability, action syntax, and output width only. Othertext-v1tool formatters are unchanged.Hit headers use locator-first, type-tagged, title-last grammar. Documentation page IDs remain visible because they are the
docs_readlocator; repository target/path/range identities remain visible forcode_read. JSON remains unchanged and retains the full structured locator.Verification
bun run typecheckbun run buildgit diff --checkbun run smoke:cli: 89 steps passedbun run smoke:mcp: 46 steps passedRelease impact
Patch releases for both
githitsand@githits/mcp; recorded inchanges/search-output-hierarchy.changed.md.