Skip to content

Notifications say 100+ unread when the server's cap is reached - #799

Merged
jeremy merged 2 commits into
mainfrom
notif-unread-cap
Sep 30, 2026
Merged

jeremy merged 2 commits into
mainfrom
notif-unread-cap

Conversation

@jeremy

@jeremy jeremy commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

What

notifications list no longer reports a capped unread list as a count.

  • When the unreads list holds 100 items (the server cap), the summary says 100+ unread, and the page total gets the same +: 150+ notification(s) (100+ unread). A notice says the server returns no more than 100 and --page does not reach the rest.
  • JSON adds one boolean at the top level of data: unreads_capped (always present, true at the cap). Every existing field keeps its name, place and shape; the result is the SDK struct embedded in a wrapper with that one extra field.
  • --page help, the list long help, the agent notes, and the "next" breadcrumb now say --page pages read notifications only and every page repeats the same unreads.
  • skills/basecamp/SKILL.md documents the cap and the flag.

Why

The server returns at most 100 unreads (MAX_UNREADS = 100 in bc3's My::ReadingsController, and documented in the API) and pages only read items. The CLI printed len(unreads) as the unread total and its "Next page" breadcrumb implied the whole feed pages, so an account with 235 unreads showed "100 unread" on every page.

This is step 1 only. Reaching every unread needs a bc3 API change (an uncapped unreads endpoint), tracked separately; nothing here tries to page past the cap.

Testing

  • New tests: 100 unreads give 100+, unreads_capped: true, a notice, and unchanged unreads/reads arrays; 99 unreads give the exact count, unreads_capped: false and no notice; the --page usage and the next-page breadcrumb say read notifications only.
  • Styled, Markdown and quiet output checked by hand at the cap.
  • make -k check compared against a clean origin/main worktree on the same Mac: the same targets fail on both (lint: five pre-existing darwin gosec/unconvert/unused findings; test: pre-existing TTY/interactive and connector timing failures). The only difference is TestNoErrorPathCarriesTheSecretOut and TestAnAgentThatStopsReadingCannotHoldCancelOrClose in internal/connector/driver/claude, which this change does not touch and which fail on origin/main too when rerun. Every other target (e2e, surface, skill drift, naming, provenance, tidy) passes.

Summary by cubic

notifications list no longer presents the server's 100-item unread cap as an exact total. When the cap is reached, the summary reads "100+ unread", JSON adds unreads_capped: true marking 100 as a lower bound, and a notice explains that --page does not reach the rest.

  • Existing data fields keep their shape; the SDK result is embedded in a wrapper with one extra boolean.
  • Help text, the agent note, the "next" breadcrumb, and skills/basecamp/SKILL.md now state that --page pages read notifications only and every page repeats the same unreads.

Written for commit b081173. Summary will update on new commits.

Review in cubic

The server returns at most 100 unreads and pages only read items. A full
unreads list now reads as "100+ unread", JSON gains unreads_capped, and
--page says it pages read notifications only.
Copilot AI balanced review requested due to automatic review settings September 30, 2026 02:01
@github-actions github-actions Bot added commands CLI command implementations tests Tests (unit and e2e) skills Agent skills labels Sep 30, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T02:13:08.933269Z b081173 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The agent guidance incorrectly says reaching 100 proves additional unread notifications exist.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Clarifies the server’s 100-unread notification cap across output, JSON, help, and agent documentation.

Changes:

  • Marks capped counts with + and adds unreads_capped.
  • Explains that pagination only affects read notifications.
  • Adds coverage for capped and uncapped responses.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
skills/​basecamp/​SKILL.md Documents unread limits and pagination behavior.
internal/​commands/​notifications.go Adds cap-aware output and metadata.
internal/​commands/​notifications_test.go Tests cap reporting and pagination guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/commands/notifications.go Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f31940b387

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/commands/notifications.go Resolved
Comment thread internal/commands/notifications.go Resolved
Exactly 100 unreads also reach the cap, so unreads_capped marks a lower
bound. Name 'notifications list --page' in the agent note, since the bare
command has no --page. Preallocate the test fixture slices for prealloc.
Copilot AI balanced review requested due to automatic review settings September 30, 2026 02:09
@jeremy

jeremy commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

Copilot AI 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.

Copilot review overview

🟢 Approved

The implementation consistently handles the server cap and includes focused regression coverage.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: b081173a3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jeremy
jeremy merged commit c0b5896 into main Sep 30, 2026
31 checks passed
@jeremy
jeremy deleted the notif-unread-cap branch September 30, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations skills Agent skills tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants