Skip to content

Add an All Option to Huddle's Group By for One Ungrouped Thread - #850

Merged
Dharp02 merged 18 commits into
mainfrom
feat/848-huddle-all-grouping
Nov 11, 2026
Merged

Dharp02 merged 18 commits into
mainfrom
feat/848-huddle-all-grouping

Conversation

@Dharp02

@Dharp02 Dharp02 commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #848

Overview

819DAC3A-3A15-43D9-BEA1-835D9730A1EA.mov

Huddle always split posts into separate conversations (Day, Session, Person, Ticket), so there was no way to read the whole feed as one stream. This adds All as the first choice in Group by: every post in the current team, or in Personal, goes into one "All updates" thread, oldest first.

This is option A of three prototypes, chosen because it is the smallest change and sits where people already look.

Changes

  • superChatFeed.ts
    • New 'all' ThreadBy that puts every post in one conversation, all:feed, titled "All updates".
    • A system line naming the date (e.g. "Wed, Sep 30") opens each day, because SuperChat has no date separators yet (docs/superchat-inbox-gaps.md). Clock-in/out lines stay in place.
    • New searchPosts(): the same fields and rules as searchConversations, but per post, including each post's clock lines. In All it narrows the posts in the one thread instead of keeping or dropping the whole conversation.
    • clockLine is renamed to systemLine, since it now builds date lines as well.
  • Huddle.tsx
    • All is first in the Group by menu, with a "New" badge and a separator below it, and is saved like the other groupings.
    • A post link still opens the post's Session thread, even with All saved: SuperChatInbox can't scroll to a message, and the long All thread would leave the post offscreen. This is logged as gap 3.19 in docs/superchat-inbox-gaps.md.
    • With no posts, the starter conversation in All is all:feed ("All updates"), so a saved all:feed link still opens.
  • Release note: a new section in release-notes/1.2.0.md, which isn't tagged yet. Its PR line links this PR.

Testing

  • npm run lint, npm run typecheck, npm run format: clean
  • Unit tests: 911/911 pass, including 6 new tests for All (one conversation; order and date lines; no date lines in other groupings; searchPosts; search by clock lines; the All starter conversation)
  • E2E: all Huddle specs pass (79/79), including a new test for a post link with All saved (12 newer posts; the post is in view in its Session thread; All stays saved)
  • E2E: a new test in inbox-filters.spec.ts checks that posts from 3 days ago and today share one thread with a date line, that search narrows it, and that the choice survives a reload. The Group by description test now covers All too.
  • Full e2e run: 450 passed, 6 skipped, 2 failed:
    • dashboard/session-timer.spec.ts:177 passed on rerun, so it is flaky.
    • tickets/video-upload.spec.ts:41 fails every time locally: the uploaded video comes back as video/webm where the test expects video/mp4. That is backend video conversion, which this PR doesn't touch.
  • Smoke test in the browser: picking All shows a single "All updates" row with every post from all days in the thread, and older posts load on scroll with their date lines.

Out of Scope

  • Real date separators in SuperChat. This PR uses system lines as a stand-in until mieweb/ui supports them.
  • Making All the default grouping.

🤖 Generated with Claude Code

Group by gains "All" as its first choice: every post in the team (or
Personal) lands in a single "All updates" conversation, oldest first.

- Each day opens with a system line naming its date, since SuperChat has
  no date separators; clock-in/out lines stay in place.
- Search in All narrows the posts in the thread (new searchPosts) rather
  than keeping or dropping the one conversation.
- A post link opens the All thread when All is the saved grouping.
- The choice persists like the other groupings.

Closes #848
Copilot AI balanced review requested due to automatic review settings November 6, 2026 18:42

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.

🟡 Changes recommended

Active issues remain in All feed search consistency, deep-link scrolling to target posts, and empty-feed resolution of canonical conversation links.

3 open issues
What changed in this PR

Adds an All grouping to Huddle so users can read updates in one chronological thread instead of separate conversations, addressing #848 without changing the default grouping.

Changes:

  • Builds one “All updates” thread with date separators and existing session markers.
  • Adds the persisted All menu option, per-post search, and post-link routing.
  • Adds unit and end-to-end coverage and documents the feature in release notes.
File Description
tests/​e2e/​huddle/​inbox-filters.spec.ts Tests All grouping, date lines, search, and persistence.
tests/​e2e/​huddle/​helpers.ts Allows helpers to select All.
src/​pages/​Huddle.tsx Adds All selection, search integration, and post-link routing.
src/​features/​huddle/​superChatFeed.ts Builds the unified thread, date lines, and per-post search.
src/​features/​huddle/​superChatFeed.test.ts Tests unified grouping, ordering, date lines, and search.
release-notes/​1.2.0.md Documents the new Huddle option.

Review effort: Balanced

Comment thread src/features/huddle/superChatFeed.ts Resolved
Comment thread src/pages/Huddle.tsx Resolved
Comment thread src/pages/Huddle.tsx Resolved
…rouping

# Conflicts:
#	release-notes/1.2.0.md
#	src/pages/Huddle.tsx
- Search in All also matches each post's clock lines ("clocked out",
  "You clocked in · 09:00"), as the conversation-wide search in the other
  groupings does.
- An empty feed in All gets its starter conversation as all:feed, titled
  All updates, so a saved all:feed link opens instead of "not found".
- A post link opens the post's Session thread again, even with All saved:
  SuperChatInbox can't scroll to a message, so the long All thread left the
  post offscreen. Logged as gap 3.19 in docs/superchat-inbox-gaps.md, with
  the All date lines as a workaround for gap 3.1.
Copilot AI balanced review requested due to automatic review settings November 6, 2026 20:02
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

🗑️ Preview Environment Cleaned Up

The preview container for this PR has been deleted.

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.

🟡 Changes recommended

Search indexes stored post dates but not displayed date labels, causing timezone-shifted updates to disappear when users search their displayed date; include the label and add a regression test.

1 open issue
3 resolved since last review

Review effort: Balanced

Comment thread src/features/huddle/superChatFeed.ts Resolved
…on shows shifts only

A post from Huddle's message box never carried the author's clock session,
so the Session grouping put it in an "Off the clock" thread of its own,
even mid-shift.

- createHuddlePost links a post to the author's open session in the team
  when it names none (not for scheduled posts) and returns that id.
- The Session grouping leaves out posts with no session; they stay in All,
  Day and Person. The off-the-clock title and system line are removed.
- A post link to an off-the-clock post opens its Day thread; posting from
  Session while clocked out opens the Day the post went into.

Closes #853
- Session with posts but no shifts shows the starter conversation, so its
  message box is still there; its hint says there are no shifts yet.
- Opening where a post landed is skipped if the reader switched team or
  view while it was sending.
…mid-send

- The Day thread a post opens in uses the date stamped on the post, not a
  second read of the clock, so a send across midnight opens the right day.
- Opening where a post landed is skipped if Group by changed while it sent.
All's date lines come from when a post appeared, in the reader's timezone;
search only knew the post's stored postDate. Both dates are now searchable
when they differ.
Copilot AI balanced review requested due to automatic review settings November 6, 2026 21:20

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.

🔵 Needs a closer look

Cross-midnight session updates disappear from searches combining the visible clock-out date and text because session dates are not indexed, requiring a fix and regression test.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Include session dates in searchable clock-event context

src/​features/​huddle/​superChatFeed.ts:819

For a session whose only post is on Sep 28 but whose clock-out is after midnight on Sep 29, All shows a Sep 29 divider above the clock-out, yet searching "clocked out Sep 29" removes the post. postSearchText only indexes the post's dates, and includeDay: false omits the clock events' dates from this searchable context. Include the session dates here and add a cross-midnight test so searches combining a visible date and clock line still find the update.

1 resolved since last review

Review effort: Balanced

- Skipped when the reader has left Huddle: it stays mounted under
  <Activity>, whose paused render can't tell, so the live URL decides.
- Skipped until the post is in the loaded feed (team) or the refreshed
  Personal list, so a failed refresh doesn't open a not-found thread.

@SarkarShubhdeep SarkarShubhdeep 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.

Looks good, thanks!

…ts plan

Review on #854: auto-linking made a mid-shift post the session's earliest
post, so the clock-out gate, the Pulse wrap-up and the Clock page's wrap-up
editor took it for the plan and wrote the wrap-up onto it.

- Only huddle.createPost (Huddle's message box, REST, MCP) joins the open
  session, and stamps the post sessionUpdate: true. Pulse posts and the
  shared createHuddlePost no longer link on their own.
- SESSION_POST_FILTER keeps updates out of every session-post lookup
  (clockStop, appendWrapUp, getMyPostForSession) and the feed's plan pick.
- Clock-in clears the stamp on the plan post it links.
- Review nits: a duplicated comment, and HUDDLE_PATH above its own comment.
Dharp02 and others added 3 commits November 10, 2026 11:46
useSessionPost now skips posts flagged sessionUpdate, as the server's
SESSION_POST_FILTER does, so a shift with no plan takes the no-plan path
instead of saving its wrap-up onto an update clockStop ignores.

enrichPost always sends sessionUpdate as a boolean. The DDP client merges
changed fields, so leaving it out kept a promoted plan's stale true.
Recent activity called any post with a clockEventId "Posted their plan &
clocked in". Updates posted while clocked in now join the session too, so
the label also checks sessionUpdate.
…sion

fix(huddle): posts made while clocked in join the live session; Session shows shifts only
Copilot AI balanced review requested due to automatic review settings November 11, 2026 14:51
Resolve conflicts with #852 (Personal shows only Personal posts): drop the
team name from search and from All's search path too, keep All's date terms
and Session's shift-only hint, and keep both release-note sections.

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.

🟡 Changes recommended

A pending send or feed refresh can replace a newly selected Session conversation because completion navigation does not check whether the active conversation changed.

1 open issue

Review effort: Balanced

Comment thread src/pages/Huddle.tsx Resolved
Copilot AI balanced review requested due to automatic review settings November 11, 2026 14:56

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.

🟡 Changes recommended

Pending sends can override a newly selected conversation, and deep links can discard their target while the linked post remains offscreen.

2 open issues

Review effort: Balanced

Comment thread src/pages/Huddle.tsx Resolved
The Session landing only checked grouping and scope, so opening another
Session thread during the send's feed refresh got undone when it finished.
Skip the landing when the open conversation changed since the send.
Copilot AI balanced review requested due to automatic review settings November 11, 2026 17:05

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.

🔵 Needs a closer look

Human assessment is needed to evaluate an overnight-session search inconsistency where a displayed clock-out date is missing from the searchable context.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@Dharp02
Dharp02 merged commit 4ee9256 into main Nov 11, 2026
16 checks passed
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.

Add a No Grouping (All) Option to the Huddle Page

3 participants