Skip to content

fix(teams): watched group chats get weekly threads and title lookup - #670

Open
patroza wants to merge 4 commits into
fork/devfrom
fix/teams-weekly-thread-buckets
Open

patroza wants to merge 4 commits into
fork/devfrom
fix/teams-weekly-thread-buckets

Conversation

@patroza

@patroza patroza commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

What changes

Fixes for watched Teams group chats, where Omegent stays silent and only observes.

Weekly observation threads

  • Each watched group chat now opens a fresh observation thread every week, instead of keeping one forever.
  • The chat's key gets a week-YYYY-MM-DD suffix naming the Monday the week starts on, at 00:00 Europe/Amsterdam (teams/weeklyThreads.ts).
  • The first observed message after Monday opens a new T3 thread, Discord alert thread and Teams mirror thread (TeamsGroupChatObserver.ts).
  • Seen-message receipts keep the old key, so dedupe is unaffected.

Missing chat titles

  • Watched chats are matched by title. Teams often leaves conversation.name off group chat activities, and those messages used to be dropped without a trace.
  • The gateway now reads the chat topic from Graph GET /chats/{id} when the title is missing, cached for an hour (ten minutes when nothing was found) (teams/groupChatTitles.ts).
  • Each unwatched group chat is logged once per process as Teams group chat not watched, with the title, where it came from (activity, graph or none) and the Graph outcome.
  • The Graph lookup needs the app's ChatSettings.Read.Chat resource-specific consent. The current Omega package (1.3.1) lacks it, so until the ops package adds it the log will show graph: "403".

Channel conversations, the linked-turn router and the response bridge are untouched.

Tests

  • weeklyThreads.test.ts: Monday bucketing, the Amsterdam midnight rollover, and month and year boundaries.
  • groupChatTitles.test.ts: activity title preferred, Graph fallback and caching, a refused lookup retried later, and untitled chats.
  • src/teams tests and the discord-bot typecheck pass.

🤖 Generated with Claude Code

github-actions Bot and others added 2 commits November 23, 2026 20:21
…ll over weekly

A Teams channel reply chain keeps the T3 thread it started on. A new top-level
post joins the thread the channel opened this week (Monday 00:00
Europe/Amsterdam) instead of opening one per post, and gets its own link row.
Group chats, which have no reply chains, start a fresh thread each week.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Several reply chains can now share one T3 thread. Each chain's bridge renders
only turns whose user message it sent; web UI turns go to the chain that last
spoke. The owned ids persist on the link so this survives restarts. Discord
bridges and older Teams links keep rendering every turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patroza
patroza marked this pull request as ready for review November 23, 2026 19:40
Scope this PR to watched group chats only. Channel reply chains, the linked
turn router and the response bridge go back to fork/dev unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patroza patroza changed the title feat(teams): one thread per channel week; answers stay in the asking chain feat(teams): watched group chats roll over to a new thread each week Nov 23, 2026
…'t watched

Watched group chats are matched by title, but Teams often leaves
conversation.name off group chat activities, so those messages were dropped
without a trace. The gateway now reads the chat topic from Graph when the title
is missing (cached per chat), and logs each unwatched chat once with its title,
where the title came from, and the Graph outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patroza patroza changed the title feat(teams): watched group chats roll over to a new thread each week fix(teams): watched group chats get weekly threads and title lookup Nov 23, 2026

This branch has not been deployed

No deployments
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.

1 participant