Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: cdd16a4cb76c404bb45c71523dd85e9a
Branch: dev/2-own-chat-more-count
Base: 2ec1687
At: 2026-10-31T07:05:21Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
The defect
read_own_chat truncates silently in two places, and its header never says how much was left out. A user asking "didn't we decide X?" can lose the deciding message with no hint that anything was cut.
core/src/host/constants.js:78OWN_CHAT_SEARCH = 20,:77OWN_CHAT_READ = 12.core/src/host/chat-index.jsbuildsSELECT text, session, seq, time, who FROM lines WHERE … ORDER BY rank LIMIT 20for a search — the 20 best ranked hits, not the newest 20; the other hits are unreachable (no offset/page, andaround/part Nonly reach neighbours of a shown anchor).core/src/host/groups.jsrenders the header and the lines; no branch adds "N more not shown".searchOwnChatreturns{ lines, every }whereeverymeans "all terms matched", not "everything was shown".
Reproduction (read-only, on main 2ec16870)
- Index a chat with 25 messages matching one term; call
read_own_chatwith that term. - Observe 20 lines, header with no count of the 5 missing hits.
- Open one part with 15 messages; call
read_own_chatwith no query. Observe 12 lines and a header that reads as if that were the whole part.
Expected
When the cap bites, the output itself must say so, e.g. … 5 more not shown; search with narrower words, or read part N around an anchor. for a search and newest 12 of 15 for a bare part read. When the count is exactly at the cap, say nothing extra. The 20/12 caps stay where they are.
Scope
chat-index.js (return the remaining count next to lines), groups.js (one clause in the header, both call sites). No cap change, no schema change, no new tool. core/test/group-work.test.js already drives the tool through host.tool('read_own_chat', …) around :449.
Acceptance (red first)
- 25 matching messages → 20 lines + a count of 5 not shown.
- One part of 15 messages → 12 lines + "newest 12 of 15".
- Exactly 20 hits / exactly 12 lines → no extra clause.
Dedup
Checked live main 2ec16870 (grep on constants.js/groups.js/chat-index.js for more not shown/newest) and the closed issues (read_own_chat in title/body: #1707, #768, #1445 — all unrelated): nothing open or closed covers this. Bench item, not an immediate fix.
Activity
chat: read_own_chat says how many hits a cap left out (ThinkFlowLab#1906