BlueGit

ict rusty-teams

docs(decisions): ADRs for OAuth bake-in, external browser, event peek (#32)

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

metis Joe Mild · pushed by metis

Authored 2026-11-14 · 2 weeks ago

Hash
ba8e1484a4e36d9115dfa8ab6628a50284352a2f
Parent
95185b87
4 files changed +73 −1
docs/decisions/0009-bundled-google-oauth-client.md added +23 −0
@@ -0,0 +1,23 @@
1 ---
2 status: accepted
3 date: 2026-11-13
4 ---
5
6 # ADR 0009: Bundled Google OAuth Desktop client
7
8 ## Context
9
10 Google Calendar Connect needs an OAuth Desktop client id. Asking every user to create one in Google Cloud Console, or to export shell variables before starting the Mac `.app`, fails for Dock and Start Menu launches. A settings field for the client id would still dump Cloud Console work on end users.
11
12 Options were: env vars only, a settings field for the client id, or one project client baked into release builds.
13
14 ## Decision
15
16 Official release builds compile in the project Desktop client id (and optional secret) via `option_env!`. Runtime env vars still override for developers. Users only click Connect Google; tokens stay on the device (see ADR 0002). Release CI must supply the client id at compile time so Dock and Start Menu launches are not Outlook-only by accident.
17
18 ## Consequences
19
20 - Connect works from a Dock-started macOS `.app` and from Windows/Linux installers without a terminal.
21 - The project owns the Google Cloud consent screen and verification path for the sensitive `calendar` scope.
22 - Local `cargo run` without the secret stays Outlook-only unless the developer exports the env vars.
23 - The client id is visible in the binary; the secret must never appear in UI, logs, or the store.
@@ -0,0 +1,23 @@
1---
2status: accepted
3date: 2026-11-13
4---
5
6# ADR 0009: Bundled Google OAuth Desktop client
7
8## Context
9
10Google Calendar Connect needs an OAuth Desktop client id. Asking every user to create one in Google Cloud Console, or to export shell variables before starting the Mac `.app`, fails for Dock and Start Menu launches. A settings field for the client id would still dump Cloud Console work on end users.
11
12Options were: env vars only, a settings field for the client id, or one project client baked into release builds.
13
14## Decision
15
16Official release builds compile in the project Desktop client id (and optional secret) via `option_env!`. Runtime env vars still override for developers. Users only click Connect Google; tokens stay on the device (see ADR 0002). Release CI must supply the client id at compile time so Dock and Start Menu launches are not Outlook-only by accident.
17
18## Consequences
19
20- Connect works from a Dock-started macOS `.app` and from Windows/Linux installers without a terminal.
21- The project owns the Google Cloud consent screen and verification path for the sensitive `calendar` scope.
22- Local `cargo run` without the secret stays Outlook-only unless the developer exports the env vars.
23- The client id is visible in the binary; the secret must never appear in UI, logs, or the store.
docs/decisions/0010-preferred-external-browser.md added +22 −0
@@ -0,0 +1,22 @@
1 ---
2 status: accepted
3 date: 2026-11-13
4 ---
5
6 # ADR 0010: Preferred browser for links and Google OAuth
7
8 ## Context
9
10 Google Calendar Connect opens an authorize URL in a real browser. In-app http(s) links do the same. The managed Chrome profile used for Microsoft sign-in (ADR 0003) must stay untouched — mixing OAuth and Teams login in that profile would fight cookies and make Connect look like another Teams sign-in.
11
12 Options were: always the OS default handler, always the managed Teams Chrome, or a user-chosen browser that is separate from the Teams session.
13
14 ## Decision
15
16 Settings stores a preferred external browser (or system default). Google authorize URLs and other in-app http(s) opens use that preference, then fall back to the OS default if the program is missing. The managed Teams Chrome launch path does not read this setting.
17
18 ## Consequences
19
20 - Users who live in Firefox or Brave can complete Google Connect there without changing how Teams signs in.
21 - Discoverable browsers are listed once at startup; an unknown saved program falls back to the system handler.
22 - This is not a second Teams session browser. ADR 0003 still owns Microsoft login.
@@ -0,0 +1,22 @@
1---
2status: accepted
3date: 2026-11-13
4---
5
6# ADR 0010: Preferred browser for links and Google OAuth
7
8## Context
9
10Google Calendar Connect opens an authorize URL in a real browser. In-app http(s) links do the same. The managed Chrome profile used for Microsoft sign-in (ADR 0003) must stay untouched — mixing OAuth and Teams login in that profile would fight cookies and make Connect look like another Teams sign-in.
11
12Options were: always the OS default handler, always the managed Teams Chrome, or a user-chosen browser that is separate from the Teams session.
13
14## Decision
15
16Settings stores a preferred external browser (or system default). Google authorize URLs and other in-app http(s) opens use that preference, then fall back to the OS default if the program is missing. The managed Teams Chrome launch path does not read this setting.
17
18## Consequences
19
20- Users who live in Firefox or Brave can complete Google Connect there without changing how Teams signs in.
21- Discoverable browsers are listed once at startup; an unknown saved program falls back to the system handler.
22- This is not a second Teams session browser. ADR 0003 still owns Microsoft login.
docs/decisions/0011-calendar-event-peek.md added +24 −0
@@ -0,0 +1,24 @@
1 ---
2 status: proposed
3 date: 2026-11-13
4 ---
5
6 # ADR 0011: Calendar events open as a Teams-like peek
7
8 ## Context
9
10 Opening a calendar event used a labeled dialog that showed a short body preview and little of the invite roster. Teams desktop shows a compact peek with agenda, RSVP, and an enlarged Tracking view. A full-page event route would leave the week grid; keeping the old dialog would keep diverging from Teams for people who live in the calendar.
11
12 Options were: keep the labeled dialog, navigate to a dedicated event page, or a Teams-like peek overlay that can enlarge.
13
14 ## Decision
15
16 Opening an event shows a compact peek over the calendar: time, series, location, invite summary, scrollable full agenda (fetched body, not only the truncated preview), and RSVP. Enlarge opens the Tracking layout (details and agenda left, attendees by response right). Google-sourced events may show calendar name, reminders, source link, and Open in Google / Email guests. Outlook/Teams keep Email organizer and optional RSVP comment.
17
18 Untrusted agenda HTML is sanitized before render (plain Google descriptions are escaped and http(s)-linkified; Graph/Teams HTML drops non-http(s)/mailto hrefs).
19
20 ## Consequences
21
22 - Calendar UX matches Teams chrome without a second navigation stack for every event.
23 - List payloads stay light; the peek loads full body and attendees on open.
24 - Status stays `proposed` until the calendar-peek pull request merges; then set `status` to `accepted`.
@@ -0,0 +1,24 @@
1---
2status: proposed
3date: 2026-11-13
4---
5
6# ADR 0011: Calendar events open as a Teams-like peek
7
8## Context
9
10Opening a calendar event used a labeled dialog that showed a short body preview and little of the invite roster. Teams desktop shows a compact peek with agenda, RSVP, and an enlarged Tracking view. A full-page event route would leave the week grid; keeping the old dialog would keep diverging from Teams for people who live in the calendar.
11
12Options were: keep the labeled dialog, navigate to a dedicated event page, or a Teams-like peek overlay that can enlarge.
13
14## Decision
15
16Opening an event shows a compact peek over the calendar: time, series, location, invite summary, scrollable full agenda (fetched body, not only the truncated preview), and RSVP. Enlarge opens the Tracking layout (details and agenda left, attendees by response right). Google-sourced events may show calendar name, reminders, source link, and Open in Google / Email guests. Outlook/Teams keep Email organizer and optional RSVP comment.
17
18Untrusted agenda HTML is sanitized before render (plain Google descriptions are escaped and http(s)-linkified; Graph/Teams HTML drops non-http(s)/mailto hrefs).
19
20## Consequences
21
22- Calendar UX matches Teams chrome without a second navigation stack for every event.
23- List payloads stay light; the peek loads full body and attendees on open.
24- Status stays `proposed` until the calendar-peek pull request merges; then set `status` to `accepted`.
docs/decisions/README.md +4 −1
@@ -24,5 +24,8 @@ Statuses: `proposed`, `accepted`, `superseded`.
24 24 | [0006](0006-mic-path-matches-browser-teams.md) | The mic path matches Teams in the browser |
25 25 | [0007](0007-local-agent-clis-beside-copilot.md) | Local agent CLIs sit beside Copilot |
26 26 | [0008](0008-product-ui-locale-en-de.md) | Product UI is English and German |
27 | [0009](0009-bundled-google-oauth-client.md) | Bundled Google OAuth Desktop client |
28 | [0010](0010-preferred-external-browser.md) | Preferred browser for links and Google OAuth |
29 | [0011](0011-calendar-event-peek.md) | Calendar events open as a Teams-like peek |
27 30
28 Records `0001` to `0008` are the decisions already shipped. `0001` follows Daniel's call-window note in `GUARDRAILS.md`.
31 Records `0001` to `0010` are the decisions already shipped. `0011` stays `proposed` until the calendar-peek pull request merges. `0001` follows Daniel's call-window note in `GUARDRAILS.md`.
@@ -24,5 +24,8 @@ Statuses: `proposed`, `accepted`, `superseded`.
24| [0006](0006-mic-path-matches-browser-teams.md) | The mic path matches Teams in the browser |
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 |
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 |
26| [0008](0008-product-ui-locale-en-de.md) | Product UI is English and German |
27| [0009](0009-bundled-google-oauth-client.md) | Bundled Google OAuth Desktop client |
28| [0010](0010-preferred-external-browser.md) | Preferred browser for links and Google OAuth |
29| [0011](0011-calendar-event-peek.md) | Calendar events open as a Teams-like peek |
27
30
28Records `0001` to `0008` are the decisions already shipped. `0001` follows Daniel's call-window note in `GUARDRAILS.md`.
31Records `0001` to `0010` are the decisions already shipped. `0011` stays `proposed` until the calendar-peek pull request merges. `0001` follows Daniel's call-window note in `GUARDRAILS.md`.