feat(report): drilldown reverse + offset options — let users reach the newest messages - #123
Open
Tyan66666 wants to merge 3 commits into
Open
feat(report): drilldown reverse + offset options — let users reach the newest messages#123Tyan66666 wants to merge 3 commits into
Tyan66666 wants to merge 3 commits into
Conversation
sort:time drilldown was ascending-only with slice(0,limit) head truncation, so the newest messages were unreachable in any sort once the conversation exceeded the limit (acp-kernel#93). Hosts without <acp> ref tags in the message stream (billion-context-dsh) rely on the drilldown as their only message-location entry, amplifying the gap. - StatusReportOptions: add reverse?: boolean (flip sorted order) and offset?: number (pagination), both backwards-compatible - renderMessageDrilldown + renderCompressedDrilldown: apply reverse after sorting, window shown rows with slice(offset, offset + limit) - footer: 'N of M shown.' stays for offset 0; offset > 0 prints 'Showing A–B of M.'; offset past end prints 'Offset N past end' instead of a silent empty page - overview Tip now advertises sort:"time" + reverse:true newest-first - tests: 7 drilldown cases (status-quo pin, reverse:time tail reach, offset pagination both directions, past-end, size reverse, tool filter + reverse, compressed scope) - README: buildStatusReport drilldown options table + example
Open
2 tasks
…nd assertion - README: drop the options table, document reverse/offset in the same prose+example style as the renderTags section (option defaults inline, compatibility note last) - test: replace blank-line-strip body check with a line-level assertion (no ' m<N>' rows after a past-end offset) — robust against future non-row ref mentions
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.
Closes #93
Problem
When agent opens the
acp_statusdrilldown (scope:"uncompressed"+view:"messages",sort:"time"), the list always starts at the oldest message.slice(0, limit)only ever shows the head, so once the conversation is longer thanlimit, the newest messages are simply unreachable — there is no way to flip the order (reverse), page forward (offset), or sort newest-first. The same head-only limitation applies tosort:"size"/sort:"tool"and toscope:"compressed".Why it matters differs by host:
<acp>ref tags into the message stream (e.g. billion-context-pi) see every message inline — the drilldown is a nice-to-have there.Fix
Two new optional options on
StatusReportOptions(backwards-compatible, no behavior change when omitted):reverse?: boolean— after sorting, flip the order.sort:"time" + reverse:truegives newest-first, so the tail of a long conversation becomes reachable.offset?: number— pagination. Rows are windowed withslice(offset, offset + limit).Applied in
renderMessageDrilldownandrenderCompressedDrilldown(both honorreversethen window withoffset). Footer text:offset0 keeps the existingN of M shown.;offset > 0printsShowing A–B of M.; an offset past the end printsOffset N past end (M total).instead of a silent empty page. The overview Tip now advertisessort:"time" + reverse:truefor newest-first, and README's drilldown options table + example are updated.Usage:
Tests
7 new cases in
tests/report-drilldown.test.ts: status-quo pin (oldest-first head-only),reverse:timereaches the newest messages, offset pagination in both directions, offset past end,sort:"size"reverse (smallest-first),toolfilter + reverse, andscope:"compressed"reverse + pagination. Full suite: 444 pass, typecheck + build clean.