docs: add an ADR template and notes from recent fork work
Keep the why for the calendar, sign-in, share, mic, agent, and locale choices next to the code so later reviews can start from the decision.
@@ -1,3 +1,5 @@
1
1
target/
2
2
.claude/
3
docs/
3
docs/*
4
!docs/decisions/
5
!docs/decisions/**
@@ -1,3 +1,5 @@1
target/1
target/2
.claude/2
.claude/3
docs/3
docs/*4
!docs/decisions/5
!docs/decisions/**@@ -51,3 +51,4 @@ Clean up after every test: delete test messages, restore settings and status.
51
51
1. Find how Teams does it: `docs/research/*.md`, then the live bundle.
52
52
2. Write findings back to `docs/research/<topic>.md`.
53
53
3. If a change has to break a "must match" rule, name the deviation in the commit body.
54
4. If the change picks one reasonable path over another, and that choice is not already a rule here, add a short note under `docs/decisions/` (see `docs/decisions/README.md`).
@@ -51,3 +51,4 @@ Clean up after every test: delete test messages, restore settings and status.51
1. Find how Teams does it: `docs/research/*.md`, then the live bundle.51
1. Find how Teams does it: `docs/research/*.md`, then the live bundle.52
2. Write findings back to `docs/research/<topic>.md`.52
2. Write findings back to `docs/research/<topic>.md`.53
3. If a change has to break a "must match" rule, name the deviation in the commit body.53
3. If a change has to break a "must match" rule, name the deviation in the commit body.54
4. If the change picks one reasonable path over another, and that choice is not already a rule here, add a short note under `docs/decisions/` (see `docs/decisions/README.md`).@@ -0,0 +1,20 @@
1
# ADR NNNN: short title
2
3
- Status: proposed
4
- Date: YYYY-MM-DD
5
6
## Context
7
8
What is going on, and why a decision is needed. Name the options that were actually on the table. Keep this short.
9
10
## Decision
11
12
What we will do. One decision per file.
13
14
## Consequences
15
16
What gets easier, what gets harder, and what we are explicitly not doing.
17
18
## Superseded by
19
20
Leave this out until a later ADR replaces this one. Then set Status to `superseded` and link the replacement, for example `0007-new-title.md`.
@@ -0,0 +1,20 @@1
# ADR NNNN: short title2
3
- Status: proposed4
- Date: YYYY-MM-DD5
6
## Context7
8
What is going on, and why a decision is needed. Name the options that were actually on the table. Keep this short.9
10
## Decision11
12
What we will do. One decision per file.13
14
## Consequences15
16
What gets easier, what gets harder, and what we are explicitly not doing.17
18
## Superseded by19
20
Leave this out until a later ADR replaces this one. Then set Status to `superseded` and link the replacement, for example `0007-new-title.md`.@@ -0,0 +1,22 @@
1
# ADR 0001: Calls and meetings open in their own window
2
3
- Status: accepted
4
- Date: 2026-11-11
5
6
## Context
7
8
An earlier deviation kept the call inside the main window. Teams does not: a call or meeting gets its own window, and the chat window stays usable. On 2026-11-11 Daniel replaced that deviation. On 2026-11-12 he added the capture rule.
9
10
Options were: keep the in-app call pane, or follow Teams with a separate window.
11
12
## Decision
13
14
A call or meeting opens in its own window. The main window stays free for chats. Sharing a window minimizes the call window, as Teams does. Layout and gallery follow Teams.
15
16
Only the share bar and the share border stay out of captures. The call window, the mini window, and gallery windows show up in screenshots, as in Teams.
17
18
## Consequences
19
20
- Chat stays reachable during a call.
21
- Window placement, gallery paging, and the toolbar are specified against Teams, not against a custom in-app layout.
22
- Screen-share capture rules in ADR 0005 must not hide the call window itself.
@@ -0,0 +1,22 @@1
# ADR 0001: Calls and meetings open in their own window2
3
- Status: accepted4
- Date: 2026-11-115
6
## Context7
8
An earlier deviation kept the call inside the main window. Teams does not: a call or meeting gets its own window, and the chat window stays usable. On 2026-11-11 Daniel replaced that deviation. On 2026-11-12 he added the capture rule.9
10
Options were: keep the in-app call pane, or follow Teams with a separate window.11
12
## Decision13
14
A call or meeting opens in its own window. The main window stays free for chats. Sharing a window minimizes the call window, as Teams does. Layout and gallery follow Teams.15
16
Only the share bar and the share border stay out of captures. The call window, the mini window, and gallery windows show up in screenshots, as in Teams.17
18
## Consequences19
20
- Chat stays reachable during a call.21
- Window placement, gallery paging, and the toolbar are specified against Teams, not against a custom in-app layout.22
- Screen-share capture rules in ADR 0005 must not hide the call window itself.@@ -0,0 +1,26 @@
1
# ADR 0002: Optional calendars beside Outlook
2
3
- Status: accepted
4
- Date: 2026-11-11
5
6
## Context
7
8
The calendar was Outlook only. People who also live in Google Calendar, or who have no usable mailbox, had no grid. Replacing Outlook would fight the Teams account. A second, separate calendar screen would hide conflicts.
9
10
Options were: Outlook only, Google instead of Outlook, or both in one grid with an explicit home calendar.
11
12
## Decision
13
14
Outlook stays the Teams calendar. Google is an optional extra account, stored on the device until the user disconnects. More providers can follow the same shape.
15
16
Events from the selected calendars share the week and month grid. The same meeting (same iCal UID or the same Teams join URL) is shown once, with its sources marked.
17
18
The user picks one home calendar. New meetings always write there, and may also write to extra targets. RSVP and reminder writes follow the calendar that owns the event. Google is polled. There is no Google push webhook.
19
20
If Outlook is missing or failing, a connected Google calendar still fills the grid, and a new meeting can still carry a Teams join link.
21
22
## Consequences
23
24
- The app is usable for calendar without a working Outlook mailbox.
25
- Credentials for non-Teams calendars stay local. They are not written into the Teams account.
26
- Each new provider needs its own connect, RSVP, and reminder path. The grid and the home-calendar rule stay.
@@ -0,0 +1,26 @@1
# ADR 0002: Optional calendars beside Outlook2
3
- Status: accepted4
- Date: 2026-11-115
6
## Context7
8
The calendar was Outlook only. People who also live in Google Calendar, or who have no usable mailbox, had no grid. Replacing Outlook would fight the Teams account. A second, separate calendar screen would hide conflicts.9
10
Options were: Outlook only, Google instead of Outlook, or both in one grid with an explicit home calendar.11
12
## Decision13
14
Outlook stays the Teams calendar. Google is an optional extra account, stored on the device until the user disconnects. More providers can follow the same shape.15
16
Events from the selected calendars share the week and month grid. The same meeting (same iCal UID or the same Teams join URL) is shown once, with its sources marked.17
18
The user picks one home calendar. New meetings always write there, and may also write to extra targets. RSVP and reminder writes follow the calendar that owns the event. Google is polled. There is no Google push webhook.19
20
If Outlook is missing or failing, a connected Google calendar still fills the grid, and a new meeting can still carry a Teams join link.21
22
## Consequences23
24
- The app is usable for calendar without a working Outlook mailbox.25
- Credentials for non-Teams calendars stay local. They are not written into the Teams account.26
- Each new provider needs its own connect, RSVP, and reminder path. The grid and the home-calendar rule stay.@@ -0,0 +1,24 @@
1
# ADR 0003: Sign-in through a browser session
2
3
- Status: accepted
4
- Date: 2026-11-12
5
6
## Context
7
8
Rusty Teams must sign in to a company tenant without an app registration and without storing tokens on disk. Windows already does that with embedded WebView2. WebView2 does not exist on Linux or macOS.
9
10
Options were: a stored refresh token, an embedded engine per OS, or a real Chrome/Chromium window that the app starts and that holds the session.
11
12
## Decision
13
14
Windows keeps WebView2.
15
16
On Linux and macOS the app starts Chrome or Chromium with remote debugging and its own profile, shows it for login, and hides it again afterwards. The app finds Chrome in the usual install locations. Only that managed Chrome may be stopped via the debug port. A second launch brings the existing instance forward. The UI can paint from the local cache before the network answers.
17
18
Tokens are not written to disk. The browser profile holds the session.
19
20
## Consequences
21
22
- Linux and macOS need a Chrome or Chromium install.
23
- Sign-in bugs are browser and profile bugs, not a second token store to rotate.
24
- The headless user agent must look like desktop Chrome on that OS, or Microsoft rejects the session.
@@ -0,0 +1,24 @@1
# ADR 0003: Sign-in through a browser session2
3
- Status: accepted4
- Date: 2026-11-125
6
## Context7
8
Rusty Teams must sign in to a company tenant without an app registration and without storing tokens on disk. Windows already does that with embedded WebView2. WebView2 does not exist on Linux or macOS.9
10
Options were: a stored refresh token, an embedded engine per OS, or a real Chrome/Chromium window that the app starts and that holds the session.11
12
## Decision13
14
Windows keeps WebView2.15
16
On Linux and macOS the app starts Chrome or Chromium with remote debugging and its own profile, shows it for login, and hides it again afterwards. The app finds Chrome in the usual install locations. Only that managed Chrome may be stopped via the debug port. A second launch brings the existing instance forward. The UI can paint from the local cache before the network answers.17
18
Tokens are not written to disk. The browser profile holds the session.19
20
## Consequences21
22
- Linux and macOS need a Chrome or Chromium install.23
- Sign-in bugs are browser and profile bugs, not a second token store to rotate.24
- The headless user agent must look like desktop Chrome on that OS, or Microsoft rejects the session.@@ -0,0 +1,22 @@
1
# ADR 0004: Match Teams behavior, use the OS mechanism
2
3
- Status: accepted
4
- Date: 2026-11-12
5
6
## Context
7
8
Windows is where Teams desktop behavior is easiest to copy, because WebView2, window lists, and the audio stack are the ones Teams itself uses. Linux and macOS cannot call those APIs. Copying the Windows mechanism anyway produces empty share menus, a silent mic, or a sign-in window that never appears.
9
10
Options were: Windows-only, a lowest-common-denominator subset, or the same user-visible behavior with the mechanism that OS actually allows.
11
12
## Decision
13
14
What the user sees matches Teams, and matches Windows where Windows already matches Teams. The mechanism may be the native one: WebView2 on Windows, managed Chrome elsewhere, ScreenCast or ScreenCaptureKit for sharing, Pulse or CoreAudio for the mic.
15
16
A missing platform service is shown. It is not replaced with a dead button or a fake source list.
17
18
## Consequences
19
20
- A feature is not done on Linux or macOS just because the Windows code path compiled.
21
- ADRs 0003, 0005, and 0006 are applications of this rule, not exceptions to it.
22
- `GUARDRAILS.md` still wins when a change would diverge from Teams for other people in the tenant.
@@ -0,0 +1,22 @@1
# ADR 0004: Match Teams behavior, use the OS mechanism2
3
- Status: accepted4
- Date: 2026-11-125
6
## Context7
8
Windows is where Teams desktop behavior is easiest to copy, because WebView2, window lists, and the audio stack are the ones Teams itself uses. Linux and macOS cannot call those APIs. Copying the Windows mechanism anyway produces empty share menus, a silent mic, or a sign-in window that never appears.9
10
Options were: Windows-only, a lowest-common-denominator subset, or the same user-visible behavior with the mechanism that OS actually allows.11
12
## Decision13
14
What the user sees matches Teams, and matches Windows where Windows already matches Teams. The mechanism may be the native one: WebView2 on Windows, managed Chrome elsewhere, ScreenCast or ScreenCaptureKit for sharing, Pulse or CoreAudio for the mic.15
16
A missing platform service is shown. It is not replaced with a dead button or a fake source list.17
18
## Consequences19
20
- A feature is not done on Linux or macOS just because the Windows code path compiled.21
- ADRs 0003, 0005, and 0006 are applications of this rule, not exceptions to it.22
- `GUARDRAILS.md` still wins when a change would diverge from Teams for other people in the tenant.@@ -0,0 +1,21 @@
1
# ADR 0006: The mic path matches Teams in the browser
2
3
- Status: accepted
4
- Date: 2026-11-12
5
6
## Context
7
8
The remote party has to hear the same microphone treatment as Teams in the browser. A single software chain for every mode does not. Auto and Low in browser Teams use the platform audio device module. Music mode, Off, and computer-sound sharing do not.
9
10
Options were: one software pipeline for every mode, or the same split the browser uses.
11
12
## Decision
13
14
On Linux, Auto and Low send through the Pulse device track. On macOS, Auto and Low send through the CoreAudio device track. Music mode, Off, and computer sound use the software chain on both.
15
16
Hangup tears the audio graph down without hanging the call task. On macOS, camera preview and send use the system camera.
17
18
## Consequences
19
20
- Mic bugs are split by mode. An Auto/Low fix does not belong in the software chain, and the reverse is also true.
21
- A new OS needs the same split against that OS's device module, not a new policy.
@@ -0,0 +1,21 @@1
# ADR 0006: The mic path matches Teams in the browser2
3
- Status: accepted4
- Date: 2026-11-125
6
## Context7
8
The remote party has to hear the same microphone treatment as Teams in the browser. A single software chain for every mode does not. Auto and Low in browser Teams use the platform audio device module. Music mode, Off, and computer-sound sharing do not.9
10
Options were: one software pipeline for every mode, or the same split the browser uses.11
12
## Decision13
14
On Linux, Auto and Low send through the Pulse device track. On macOS, Auto and Low send through the CoreAudio device track. Music mode, Off, and computer sound use the software chain on both.15
16
Hangup tears the audio graph down without hanging the call task. On macOS, camera preview and send use the system camera.17
18
## Consequences19
20
- Mic bugs are split by mode. An Auto/Low fix does not belong in the software chain, and the reverse is also true.21
- A new OS needs the same split against that OS's device module, not a new policy.@@ -0,0 +1,24 @@
1
# ADR 0007: Local agent CLIs sit beside Copilot
2
3
- Status: accepted
4
- Date: 2026-11-12
5
6
## Context
7
8
Microsoft Copilot is the Teams assistant, and `GUARDRAILS.md` forbids a fake Copilot UI for a feature we do not build. People on this client also run local CLIs (Claude Code, Copilot CLI, Cursor, and others). Hiding those behind Copilot branding, or letting them send into a chat on their own, both break the rule that other people must not see a non-Teams client.
9
10
Options were: Copilot only, local CLIs that send directly, or local CLIs that propose and keep Copilot as the default.
11
12
## Decision
13
14
The app discovers installed CLIs, including binaries under user directories that a desktop session often omits from PATH, and stores profiles and actions locally.
15
16
Empty "Write with" means Microsoft Copilot, with Copilot branding. A chosen chat profile answers the chat-header island and brands the rewrite control with that profile's name. The island prompt is the newest twenty non-deleted messages plus the question. That ask does not call Copilot.
17
18
MCP can propose a message, a reaction, or a meeting. Review before send stays on unless the user turns it off or grants a time window. Meeting proposals survive a restart. Nothing uses a custom message format on the server.
19
20
## Consequences
21
22
- Copilot remains the default and is not removed.
23
- A local writer is visible as itself, not as Copilot.
24
- Agents do not send until a human accepts, except where the user explicitly disabled review.
@@ -0,0 +1,24 @@1
# ADR 0007: Local agent CLIs sit beside Copilot2
3
- Status: accepted4
- Date: 2026-11-125
6
## Context7
8
Microsoft Copilot is the Teams assistant, and `GUARDRAILS.md` forbids a fake Copilot UI for a feature we do not build. People on this client also run local CLIs (Claude Code, Copilot CLI, Cursor, and others). Hiding those behind Copilot branding, or letting them send into a chat on their own, both break the rule that other people must not see a non-Teams client.9
10
Options were: Copilot only, local CLIs that send directly, or local CLIs that propose and keep Copilot as the default.11
12
## Decision13
14
The app discovers installed CLIs, including binaries under user directories that a desktop session often omits from PATH, and stores profiles and actions locally.15
16
Empty "Write with" means Microsoft Copilot, with Copilot branding. A chosen chat profile answers the chat-header island and brands the rewrite control with that profile's name. The island prompt is the newest twenty non-deleted messages plus the question. That ask does not call Copilot.17
18
MCP can propose a message, a reaction, or a meeting. Review before send stays on unless the user turns it off or grants a time window. Meeting proposals survive a restart. Nothing uses a custom message format on the server.19
20
## Consequences21
22
- Copilot remains the default and is not removed.23
- A local writer is visible as itself, not as Copilot.24
- Agents do not send until a human accepts, except where the user explicitly disabled review.@@ -0,0 +1,21 @@
1
# ADR 0008: Product UI is English and German
2
3
- Status: accepted
4
- Date: 2026-11-12
5
6
## Context
7
8
`GUARDRAILS.md` says Teams strings come from the Teams bundle, in the account language. The app's own chrome (settings, share notices, agent labels, calendar controls) is not in that bundle. Shipping it in one language leaves the other half of the users in the wrong language. Translating message bodies would corrupt other people's content.
9
10
Options were: English-only chrome, German-only chrome, or both, with the OS locale as the default.
11
12
## Decision
13
14
Product UI strings exist in English and German. First launch follows the OS locale when that language is one of the two, otherwise English. The user can switch in the app, the choice is stored, and it applies without a restart. A missing translation falls back to English.
15
16
Message bodies, names, and other people's content stay as they are. New chrome strings go into the locale catalog, not into the Teams bundle.
17
18
## Consequences
19
20
- Teams account language and app chrome language can differ. That is intentional.
21
- A new string is not done until the catalog has an English entry. German may fall back.
@@ -0,0 +1,21 @@1
# ADR 0008: Product UI is English and German2
3
- Status: accepted4
- Date: 2026-11-125
6
## Context7
8
`GUARDRAILS.md` says Teams strings come from the Teams bundle, in the account language. The app's own chrome (settings, share notices, agent labels, calendar controls) is not in that bundle. Shipping it in one language leaves the other half of the users in the wrong language. Translating message bodies would corrupt other people's content.9
10
Options were: English-only chrome, German-only chrome, or both, with the OS locale as the default.11
12
## Decision13
14
Product UI strings exist in English and German. First launch follows the OS locale when that language is one of the two, otherwise English. The user can switch in the app, the choice is stored, and it applies without a restart. A missing translation falls back to English.15
16
Message bodies, names, and other people's content stay as they are. New chrome strings go into the locale catalog, not into the Teams bundle.17
18
## Consequences19
20
- Teams account language and app chrome language can differ. That is intentional.21
- A new string is not done until the catalog has an English entry. German may fall back.@@ -0,0 +1,28 @@
1
# Decisions
2
3
Short notes for choices that are easy to re-argue once more people (and agents) touch the repo. `ROADMAP.md` says what we are building. `GUARDRAILS.md` says where we must match Teams. A decision record says why we picked one reasonable path over another.
4
5
Write one when a future contributor would otherwise have to guess. Skip one for a bugfix, a refactor, or anything `GUARDRAILS.md` already settles.
6
7
## How to add one
8
9
1. Copy `0000-template.md` to `NNNN-short-title.md`. Numbers start at `0001` and only go up.
10
2. Status starts as `proposed`. It becomes `accepted` when the pull request that introduces it is merged, unless the discussion says otherwise.
11
3. One decision per file. If a later change replaces it, add a new ADR and mark the old one `superseded`. Do not rewrite history in place.
12
13
Statuses: `proposed`, `accepted`, `superseded`.
14
15
## Records
16
17
| | Decision |
18
|---|---|
19
| [0001](0001-dedicated-call-window.md) | Calls and meetings open in their own window |
20
| [0002](0002-optional-calendars-beside-outlook.md) | Optional calendars beside Outlook |
21
| [0003](0003-sign-in-through-a-browser-session.md) | Sign-in through a browser session |
22
| [0004](0004-match-teams-behavior-use-the-os-mechanism.md) | Match Teams behavior, use the OS mechanism |
23
| [0005](0005-screen-share-uses-the-system-picker.md) | Screen share uses the system picker |
24
| [0006](0006-mic-path-matches-browser-teams.md) | The mic path matches Teams in the browser |
25
| [0007](0007-local-agent-clis-beside-copilot.md) | Local agent CLIs sit beside Copilot |
26
| [0008](0008-product-ui-locale-en-de.md) | Product UI is English and German |
27
28
Records `0001` to `0008` are the decisions already shipped. `0001` follows Daniel's call-window note in `GUARDRAILS.md`.
@@ -0,0 +1,28 @@1
# Decisions2
3
Short notes for choices that are easy to re-argue once more people (and agents) touch the repo. `ROADMAP.md` says what we are building. `GUARDRAILS.md` says where we must match Teams. A decision record says why we picked one reasonable path over another.4
5
Write one when a future contributor would otherwise have to guess. Skip one for a bugfix, a refactor, or anything `GUARDRAILS.md` already settles.6
7
## How to add one8
9
1. Copy `0000-template.md` to `NNNN-short-title.md`. Numbers start at `0001` and only go up.10
2. Status starts as `proposed`. It becomes `accepted` when the pull request that introduces it is merged, unless the discussion says otherwise.11
3. One decision per file. If a later change replaces it, add a new ADR and mark the old one `superseded`. Do not rewrite history in place.12
13
Statuses: `proposed`, `accepted`, `superseded`.14
15
## Records16
17
| | Decision |18
|---|---|19
| [0001](0001-dedicated-call-window.md) | Calls and meetings open in their own window |20
| [0002](0002-optional-calendars-beside-outlook.md) | Optional calendars beside Outlook |21
| [0003](0003-sign-in-through-a-browser-session.md) | Sign-in through a browser session |22
| [0004](0004-match-teams-behavior-use-the-os-mechanism.md) | Match Teams behavior, use the OS mechanism |23
| [0005](0005-screen-share-uses-the-system-picker.md) | Screen share uses the system picker |24
| [0006](0006-mic-path-matches-browser-teams.md) | The mic path matches Teams in the browser |25
| [0007](0007-local-agent-clis-beside-copilot.md) | Local agent CLIs sit beside Copilot |26
| [0008](0008-product-ui-locale-en-de.md) | Product UI is English and German |27
28
Records `0001` to `0008` are the decisions already shipped. `0001` follows Daniel's call-window note in `GUARDRAILS.md`.