Repository navigation
fix(research): make cited text tool outputs directly readable - #7299
Merged
Merged
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
requested review from
huangruiteng,
maxliux5 and
songoow
as code owners
October 25, 2026 07:54
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.
Goal And Delivered Outcome
Opening a research citation containing a saved text tool result currently exposes escaped transport JSONL. Researchers must manually unwrap it before they can inspect the output. This repair shows the supported literal output in source order, keeps recorded exit information honest, and retains the complete original on demand.
main.Author Declaration
docs/reference/trajectory-assessment.mdsource-reading journey anddocs/development/design.mdprogressive disclosure, at baseaf68b0ff180ca8309b5d63d7ee326c77848521bb.CitationContent, literal output projection and one raw disclosure; packaged browser scenarioScope And Continuation
Complete within this repair. It supports text-only
function_call_outputandcustom_tool_call_outputrecords and known direct shell-result envelopes. It reuses the native completed-command reader and existing styles; adds no endpoint, settings, source authority or model invocation.Unknown nested transport remains literal. This does not establish scientific entailment, independent comprehension gains, full research-program acceptance or installed adoption. Those wider research outcomes remain with the existing program. Cross-surface extraction into the normalized conversation renderer is deferred because cited originals require a different lossless fallback boundary.
Validation
1bf19b1d3f4e3c97b4e250089fe45f4c669e5450(identical source content to the tested worktree).finished. Inputs:synthetic,authorized_private_read_only.git diff --check; RFC bilingual check; public text scanresearch-native-reading: 23 synthetic cases over production HTTP and disposable on-disk SQLite 3.53.1; native commands, tool strings/arrays, pending/failure/empty, mixed/malformed fallback, unsafe integers, literal script-shaped text, exact raw content and keyboard return; Chinese/English and desktop/390pxpytest tests/capabilities/test_trajectory_assessment_store.py tests/presentation/test_research_analysis_api.py -q: 53 passedmanual_review_requiredfor the four image files. Independent screenshot review remains required.Coverage targets the changed parser/rendering seam and original source/API owner. No backend behavior, scoring, analysis output, permission or execution path changes. No self-merge or auto-merge.
Frontend / Visual Evidence
Source-packaged UI with fully synthetic data, tested at
1bf19b1d3f4e3c97b4e250089fe45f4c669e5450. These are the first visible screens after the same source-opening action. Natural document scrolling differs as decoded content grows; this is not a fixed-camera measurement. The failure text and script-shaped line are intentionally literal.Reproduce with the packaged
research-native-readingbrowser scenario inexamples/personal-workspace-browser/. No public hosted preview is provided. Public screenshots contain only synthetic fixture data; the private readback is not attached.Attention review: output earns the primary reading area, while transport and arguments remain on demand. Long negative results stay in document flow; failures and unknown exit status remain visible. Existing spacing, controls, status typography and colors are reused; no new card system or visual vocabulary.
Type And Boundary