Skip to content
This repository was archived by the owner on Oct 12, 2026. It is now read-only.

bound reply chains in list output to 3 most recent - #83

Merged
0xgleb merged 1 commit into
masterfrom
fix/todo-reply-bounding
Oct 3, 2026
Merged

0xgleb merged 1 commit into
masterfrom
fix/todo-reply-bounding

Conversation

@0xgleb

@0xgleb 0xgleb commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Motivation

Issue #30: task-list responses expand long historical reply chains alongside current work, obscuring actionable state and consuming excessive tokens. The active-first ordering from #67 bounded completed todos but reply chains were still unbounded.

Solution

formatTodoList bounds each todo's reply chain to the 3 most recent replies with a count-prefixed omission indicator. Full history remains in durable state and is retrievable through explicit todo queries.

Validation

RED observed (test expected reply 12/11/10 visible and reply 9 absent with '9 earlier replies omitted'; failed against unbounded rendering). GREEN after: todo suite 59/59.

Summary by CodeRabbit

  • New Features
    • Todo entries now display the three most recent replies, with a note indicating how many earlier replies were omitted. Entries without replies remain unchanged.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 62bb8a84-a738-43ba-ab99-88503afc0574
📥 Commits

Reviewing files that changed from the base of the PR and between 4b6d2de and b8b99bf.

📒 Files selected for processing (2)
  • pi/extensions/todo/state.test.ts
  • pi/extensions/todo/state.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: fj (x86_64-darwin)
  • GitHub Check: fj (aarch64-darwin)
  • GitHub Check: fj (x86_64-linux)
  • GitHub Check: fj (aarch64-linux)
🔇 Additional comments (2)
pi/extensions/todo/state.test.ts (1)

411-425: LGTM!

pi/extensions/todo/state.ts (1)

585-586: 🎯 Functional Correctness

The reply-ordering contract remains unresolved.

transitionTodoState appends replies, but the available evidence does not establish whether effect@3.22.2 preserves their order when decodeTodoState decodes persisted state. The decoder implementation could not be inspected, so whether slice(-REPLY_HISTORY_LIMIT) selects the newest replies after decoding is undecidable.


Walkthrough

formatTodoList now displays up to three recent replies per todo. When earlier replies exist, the output includes their count. A test checks the output for a todo with 12 replies.

Changes

Todo reply display

Layer / File(s) Summary
Limit displayed replies
pi/extensions/todo/state.ts, pi/extensions/todo/state.test.ts
formatTodoList displays the latest three replies and reports how many earlier replies it omitted. A test checks that 12 replies produce three displayed replies and an omission count of 9.

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b8b99

Todo lists show the three most recent replies and indicate how many earlier replies are omitted. No merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: limit list output to the three most recent replies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@0xgleb
0xgleb merged commit 8f70b08 into master Oct 3, 2026
5 checks passed
@0xgleb
0xgleb deleted the fix/todo-reply-bounding branch October 3, 2026 20:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant