Skip to content

Inbox refactor#2045

Open
delkc wants to merge 6 commits into
mainfrom
claydelk/inbox-refactor
Open

Inbox refactor#2045
delkc wants to merge 6 commits into
mainfrom
claydelk/inbox-refactor

Conversation

@delkc

@delkc delkc commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Why

The current Inbox mixes overlapping feed categories with personal work queues, so All is not actually comprehensive and several filters do not make it clear why an item appears. Threads and DMs can produce one row per event instead of one row per conversation, drafts are hidden until selected, and reminders appear through multiple competing presentations.

This refactor makes Activity a focused, conversation-oriented place to catch up on work relevant to you. It is intentionally not a mirror of every unread event in every channel.

What changed

  • Rename the main destination to Activity and use the standard Lucide bell icon.
  • Refocus All on DMs, mentions, thread replies, needs-action items, replies from agents the user owns or controls, due reminders, and active drafts.
  • Exclude generic top-level channel traffic and updates from agents the user does not own or control.
  • Group each thread or DM into one row, sorted by latest activity.
  • Resume an unread conversation at its oldest unread message while opening the full thread or DM in the detail pane.
  • Reuse the existing New divider at the unread boundary.
  • Make the detail title a direct link to the canonical conversation.
  • Give Reminders and Drafts the same list/detail interaction and location metadata as conversation activity.
  • Separate Reminders and Drafts from message filters with a subtle divider, without adding another labeled section.
  • Put reminder and draft counts beside their corresponding filter labels instead of on the generic filter button.
  • Preserve the selected conversation when switching filters if it remains valid; otherwise select a valid replacement without flashing stale detail.
  • Use filter-specific empty states and rename the options toggle to Show unread only.
  • Ship the focused behavior directly. The earlier experiment gate, Custom view, and default-view controls have been removed from this PR to keep the first pass focused.

Filter model

Filter What appears
All One row per personally relevant conversation, plus due reminders and active drafts. Includes DMs, mentions, thread replies, explicit needs-action items, and replies from agents the current user owns or controls. Excludes generic top-level channel traffic, other agents' updates, and reminders that are not due yet.
Mentions Conversations containing a direct mention. Each conversation appears once and opens with full context.
Threads Conventional threaded replies, grouped to one row per thread. Broadcast replies are not treated as conventional thread replies.
Needs action Feed items explicitly classified as requiring action.
Agents Conversations whose representative response was authored by an agent the current user owns or controls, including top-level DM responses. If a human replies afterward, the conversation leaves this filter until an owned agent responds again.
Reminders All pending reminders, including upcoming reminders that stay out of All until they are due.
Drafts Active drafts, ordered by their last real edit time.

Grouping, ordering, and state

  • A thread or DM creates one Activity row rather than one row per event.
  • An unread conversation resumes at its oldest unread message so intervening context is not skipped.
  • Conversation rows still sort by their latest activity.
  • The detail pane opens the full available conversation and shows the shared New divider before the first unread message.
  • Upcoming reminders appear only in Reminders.
  • When a reminder becomes due, it enters All at its trigger time. If its source conversation is already represented, the reminder state merges into that row instead of creating a duplicate; otherwise it appears as a standalone reminder row.
  • A due reminder can enrich a row in another relative filter when that conversation already qualifies for the filter. Reminder lifecycle remains separate from message read state.
  • Drafts appear in All by their last real edit time. Opening an unchanged draft does not move it to the top.
  • Reminder and draft rows show their location as In #channel or In DM with <name>.
  • Show unread only hides reminder and draft work queues because they do not share message unread semantics.

Removed or narrowed

  • Remove the old Activity filter. The destination itself is now Activity, and the old filter overlapped with All while still containing items All omitted.
  • Narrow Agents. It no longer gathers every agent participating in a shared thread or subsequent human follow-ups.
  • Remove duplicate reminder presentations. The aggregate pending-reminders jump and duplicate generic feed rows are replaced by one list/detail model.
  • Remove Custom and default-view settings from this pass. They added considerable state and UI before the core model had been validated.
  • Do not add section labels for Reminders and Drafts. A divider communicates the distinction without creating another hierarchy in the menu.

Risk assessment

Medium implementation risk because this changes composition, grouping, ordering, read behavior, and personal queues in a primary desktop view. The implementation is scoped to the desktop UI and its local activity projection; it does not change relay schemas or public APIs.

Testing

  • Desktop formatting, lint, file-size, text-size, and TypeScript checks passed.
  • Desktop unit suite: 3,509 passed, 0 failed.
  • Desktop E2E production build passed.
  • Focused Activity Playwright coverage: 10 passed.
  • Updated reminder and smoke coverage passed after aligning assertions with the focused All model.
  • Updated Drafts screenshot coverage passed.
  • Unit coverage includes focused All matching, owned-agent filtering, conversation grouping, oldest-unread selection, selection stability, chronological reminder/draft composition, trigger-time reminder ordering, and duplicate reminder suppression.

Update: July 24, 2026

This PR originally proposed a default-off experiment with Custom and default-view controls. Review feedback led us to simplify the first release: the focused Activity behavior now ships directly, and the customization layer has been removed. The remaining naming decision between Activity and Inbox can be evaluated independently from the behavior in this PR.

Generated with Codex

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two user-visible inconsistencies need correction before this is ready:

  1. Show unread only only filters feed conversations. All still appends every pending reminder and active draft, so enabling the toggle can leave a list full of rows that have no unread state and cannot be marked read. Either define/filter personal-row unread state or make the control's scope explicit and keep those rows out of the unread result; add an E2E assertion covering mixed messages + reminders + drafts.
  2. Reminder detail renders DM context as a channel (#Alice) while the All row correctly renders In DM with Alice, contradicting this PR's stated location semantics. Use the channel type in detail and cover the DM case.

The branch is also behind current main; after these changes, rebase and require fresh CI before the final approval gate.

Comment thread desktop/src/features/home/ui/InboxListPane.tsx Outdated
Comment thread desktop/src/features/reminders/ui/RemindersPanel.tsx Outdated
@delkc
delkc force-pushed the claydelk/inbox-refactor branch 4 times, most recently from 04d71bf to 1b87f18 Compare July 23, 2026 15:13
@delkc
delkc requested a review from wesbillman July 23, 2026 15:25
@delkc
delkc marked this pull request as ready for review July 23, 2026 15:25
@delkc
delkc requested a review from a team as a code owner July 23, 2026 15:25
@delkc
delkc removed the request for review from wesbillman July 23, 2026 17:47
delkc added a commit that referenced this pull request Jul 24, 2026
@tellaho

tellaho commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🤖 @delkc This is a thoughtful rework. I’d simplify the scope and ship the strongest parts directly.

Let’s just ship this

Let’s remove the Activity experiment and make these improvements directly to the existing destination. Maintaining two paths adds implementation and testing complexity without much benefit.

Restore title navigation

Please make the channel/DM title link to the canonical conversation again. The external-link icon can remain, but it shouldn’t replace the larger, expected navigation target.

Avoid detail-pane churn when switching filters

Preserve the selected conversation when it remains valid in the destination filter. Otherwise, transition directly to the first result on wide layouts—or the list on narrow layouts—without flashing intermediate content. Coverage for both cases would help lock this in.

What we’d keep

  • Focused All feed: Keep DMs, mentions, thread replies, needs-action items, owned-agent replies, due reminders, and active drafts while excluding generic channel traffic.
  • Conversation and unread model: Keep conversation grouping, oldest-unread resume, full context, the New divider, and shared read state.
  • Filters and supporting polish: Keep the simplified filters, dedicated reminder/draft actions, responsive list/detail behavior, metadata, empty states, and unread controls.

Follow-up opportunities

  • Custom and Set as default: Keep both out of this PR. Let the focused experience settle, then reassess whether their value justifies the product, persistence, and testing complexity.
  • Inbox versus Activity: It’s worth a quick conversation with Thomas. If timing would slow the functional work, keep Activity and revisit the label later.
  • A better home for drafts: Your border idea could help distinguish drafts in the meantime, but because drafts are deliberately included in All, resolving their long-term home feels like the more complete solution.

This leaves the PR with one clear thesis: ship a focused, conversation-oriented work feed without customization, preference persistence, or an experiment fork.

@delkc
delkc force-pushed the claydelk/inbox-refactor branch from 7293394 to 28f552a Compare July 24, 2026 19:09
delkc added a commit that referenced this pull request Jul 24, 2026
@delkc

delkc commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Updated Activity behavior and controls

These replace the earlier experiment screenshots. Activity now ships directly, with Custom/default-view controls removed from this scoped pass.

Current filters

The focused message filters remain together. A subtle divider separates Reminders and Drafts, and their counts live beside the corresponding label instead of on the overall filter control.

01-current-filters

Current navigation and controls

The primary destination uses the Activity label and bell icon. The overflow is back to two focused actions: Show unread only and Mark all as read.

02-current-controls

Consecutive DMs

Before: Three consecutive DMs produced three feed rows, and opening one showed only that standalone message.

Before: separate DM rows

Current: The messages collapse into one conversation row. Opening it starts at the oldest unread DM and shows the full conversation with the existing New boundary.

Current: grouped DMs with conversation context

Thread context

Before: The row and detail view anchored on the latest reply, requiring the user to scan backward for the beginning of unread activity.

Before: latest-reply thread context

Current: The row still sorts and previews by latest activity, while opening it anchors on the oldest unread reply and preserves the familiar New boundary in the complete thread.

Current: oldest-unread thread context

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants