Skip to content

fix(thread): show how many comments a view leaves out - #87

Merged
craigcarlyle merged 1 commit into
mainfrom
craigcarlyle/thread-view-comment-count
Oct 20, 2026
Merged

craigcarlyle merged 1 commit into
mainfrom
craigcarlyle/thread-view-comment-count

Conversation

@craigcarlyle

Copy link
Copy Markdown
Contributor

Makes tdc thread view say when it holds comments back, and makes the search date filters say what they filter on.

Why: I use tdc with agents to read long Comms threads, and both of these dropped data without a warning. thread view stops at 50 comments unless you pass --limit, and the header still read --- 50 comments --- on threads with 51, 68 and 82 comments. tdc search --since filters by when content was posted, so a title search missed weekly threads that started the day before the window, even ones with posts inside it.

What changes

  • The thread view header: it reads --- 50 of 68 comments (use --limit for more) --- when the thread has more than came back. With --since or --until the thread's total doesn't apply, so it says (limit reached, use --limit for more) once the limit is hit. Otherwise it's unchanged.
  • --since and --until on search and mentions: the help now reads "Content posted since date", and the skill content adds that a thread found by its title counts from when it was created. Behaviour is unchanged, since the API filters on post date.
  • Skill content: thread view --limit now gives its default of 50.

Testing: four new tests for the header. The two that cover a cut-off view fail on main. With this build, against a real thread:

$ tdc thread view <thread with 68 comments> --raw
--- 50 of 68 comments (use --limit for more) ---
$ tdc thread view <thread with 68 comments> --raw --limit 100
--- 68 comments ---

npm test (1163 tests), type-check, lint:check and check:skill-sync pass.

🤖 Generated with Claude Code

thread view stops at 50 comments by default, and its header only
counted what came back, so a 68-comment thread read as "50 comments".
The header now says "50 of 68 comments" and points at --limit. With
--since or --until the thread's total doesn't apply, so it says when
the limit was reached instead.

The search and mentions help now also says that --since and --until
filter by when content was posted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@craigcarlyle craigcarlyle added the 🙋 Ask PR requires passing checks and independent human review before merge. label Oct 19, 2026
@craigcarlyle craigcarlyle self-assigned this Oct 19, 2026
@doistbot
doistbot requested a review from Bloomca October 19, 2026 22:26

@doistbot doistbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR makes tdc thread view transparent when it truncates — the header now reads --- 50 of 68 comments (use --limit for more) --- — and clarifies the --since/--until help text on search and mentions to state that filters apply to post date, plus a matching skill-content update documenting the default limit. No inline issues were flagged; the header logic, reuse of existing helpers like pluralize, and the in-sync SKILL/SPEC documentation all check out, the new tests cover both truncated and untruncated states, and the change is purely textual with no security-relevant surface touched.

I also left one optional follow-up note in the details below.

Optional follow-up note (1)
  • P3 src/commands/thread/view.ts:30: A date-filtered view can falsely claim the limit was hit. Example: a thread with exactly 50 comments where all of them match --since, run with the default --limit 50 — shown (50) >= limit (50) produces "--- 50 comments (limit reached, use --limit for more) ---" even though every comment was shown, contradicting the whole point of the header. Since total (thread.commentCount) is available, requiring total > shown here would make the message accurate: if (isDateFiltered && shown >= limit && total > shown).

Share Feedback • Review Logs

@Bloomca Bloomca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected 👍

@craigcarlyle
craigcarlyle merged commit 38ec2ec into main Oct 20, 2026
7 checks passed
@craigcarlyle
craigcarlyle deleted the craigcarlyle/thread-view-comment-count branch October 20, 2026 13:50
doist-release-bot Bot added a commit that referenced this pull request Oct 20, 2026
## [3.6.6](v3.6.5...v3.6.6) (2026-10-20)

### Bug Fixes

* **thread:** show how many comments a view leaves out ([#87](#87)) ([38ec2ec](38ec2ec))
@doist-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.6.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🙋 Ask PR requires passing checks and independent human review before merge. released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants