Architecture Decision Records (ADRs)
This directory contains Architecture Decision Records documenting significant technical decisions made in the Teams for Linux project.
What are ADRs?
Architecture Decision Records capture important architectural decisions along with their context and consequences. They help:
- Document the "why" behind technical choices
- Preserve context for future maintainers
- Enable better decisions by learning from past choices
- Onboard contributors faster by explaining rationale
Status Overview
| ADR | Title | Status | Date | Version |
|---|---|---|---|---|
| 001 | DesktopCapturer Source ID Format | ✅ Implemented | 2025-09-15 | v2.3.0+ |
| 002 | Token Cache Secure Storage | ✅ Implemented (cache bridge only; the encryption phase never took effect) | 2025-09-08 | v2.5.9 |
| 003 | Token Refresh Implementation | ✅ Implemented | 2025-09-22 | v2.6.0 |
| 004 | agents.md Standard Investigation | 🔄 Superseded by 036 | 2025-11-16 | N/A |
| 005 | AI-Powered Changelog Generation | 🔄 Superseded by 023 | 2025-11-17 | v2.6.15 |
| 006 | CLI Argument Parsing Library | ✅ Implemented | 2025-11-19 | N/A |
| 007 | Embedded MQTT Broker | ❌ Rejected | 2025-11-19 | N/A |
| 008 | useSystemPicker Feature for Electron 38 | ❌ Rejected | 2025-11-24 | N/A |
| 009 | Automated Testing Strategy | ✅ Implemented | 2025-12-13 | v2.7.4+ |
| 010 | Multiple Windows Support | 🔄 Superseded by 032 | 2025-11-26 | N/A |
| 011 | AppImage Update Info for Third-Party Managers | 🔄 Superseded | 2026-01-25 | v2.7.1 |
| 012 | Intune SSO Broker Compatibility | ✅ Implemented | 2026-01-25 | v2.7.1 |
| 013 | PII Log Sanitization | ✅ Implemented | 2026-01-31 | v2.7.3 |
| 014 | Quick Chat Deep Link Approach | ✅ Implemented | 2026-01-31 | v2.7.3 |
| 015 | Quick Chat Inline Messaging | ✅ Implemented | 2026-02-04 | N/A |
| 016 | Cross-Distro Testing Environment | ✅ Implemented | 2026-02-25 | v2.7.9 |
| 017 | Use workflow_run for PR Artifact Comments | ✅ Implemented | 2026-02-26 | N/A |
| 018 | Issue Triage Bot GitHub App Migration | 🔄 Superseded (service retired 2026-11-07) | 2026-03-06 | N/A |
| 019 | Repository Activity Dashboard | ✅ Implemented | 2026-03-11 | N/A |
| 020 | Multi-Account Profile Switcher | ✅ Implemented | 2026-04-16 | v2.9.0+ |
| 021 | WebAuthn / FIDO2 Hardware Security Keys on Linux | ✅ Implemented | 2026-04-21 | v2.10.0 |
| 022 | Custom Notification Toast Scope | ✅ Implemented | 2025-11-16 | v2.6.16 |
| 023 | Release Automation Tooling | ✅ Implemented | 2026-03-13 | N/A |
| 024 | Smartcard PKCS#11 PIN Dialog | ✅ Implemented | 2026-06-09 | v2.14.0 |
| 025 | Configuration Option Naming Convention | ✅ Accepted | 2026-08-11 | N/A |
| 026 | Performance Audit Outcomes | ✅ Accepted | 2026-08-11 | N/A |
| 028 | One-Time-Code Pre-fill on Third-Party IdPs | ❌ Rejected | 2026-08-19 | N/A |
| 029 | Configuration Schema as Single Source of Truth | ✅ Accepted | 2026-09-05 | v2.12.0+ |
| 030 | Graph API Access via the Teams Session Token | ✅ Implemented | 2025-11-21 | v2.6.17 |
| 031 | Keep the --ozone-platform=x11 Default on Wayland | 🔄 Superseded by 034 except snap | 2026-09-05 | N/A |
| 032 | Opt-in Secondary Window for the Same Account During Calls | 🚧 Proposed | 2026-09-18 | N/A |
| 033 | Opt-in D-Bus Control API for Teams Actions and State | ✅ Implemented | 2026-10-06 | v2.25.0+ |
| 034 | Native Wayland by Default on deb, rpm and integrated AppImage | ✅ Accepted | 2026-10-22 | pending release |
| 035 | Renderer Trust Boundary with Context Isolation Disabled | ✅ Implemented | 2026-11-07 | v2.24.0, v2.30.0 |
| 036 | Adopt AGENTS.md as the Agent Instruction File | ✅ Accepted | 2026-11-07 | N/A |
Legend:
- ✅ Implemented - Decision accepted and code in production
- ✅ Accepted - Decision accepted, implementation pending or partial
- ❌ Rejected - Decision evaluated and declined with rationale
- 🚧 Proposed - Under review, not yet accepted
- 🔄 Superseded - Replaced by a newer decision
By Topic
Authentication & Security
| ADR | Title | Summary |
|---|---|---|
| 002 | Token Cache Secure Storage | Token cache bridge that prevents daily re-authentication; the planned safeStorage encryption never took effect and was removed |
| 003 | Token Refresh Implementation | Configurable token refresh mechanism to proactively renew authentication before expiry |
| 012 | Intune SSO Broker Compatibility | Direct D-Bus invocation for Microsoft Identity Broker version compatibility |
| 013 | PII Log Sanitization | Custom regex sanitizer to redact sensitive data from logs |
| 021 | WebAuthn / FIDO2 Hardware Security Keys | FIDO2 hardware key support on Linux via fido2-tools interception |
| 024 | Smartcard PKCS#11 PIN Dialog | PIN collected in a hardened main-process window, never injected into the Teams page |
| 028 | One-Time-Code Pre-fill on Third-Party IdPs | Rejected DOM-based OTC pre-fill for Okta and similar; Electron cannot host a password-manager extension, so contract-backed factors are the answer |
| 030 | Graph API Access via the Teams Session Token | Reuse the Teams web app's own Graph token for API access instead of registering a separate Azure AD application |
| 035 | Renderer Trust Boundary with Context Isolation Disabled | Treat the Teams window's JavaScript world as page-controlled: ipcRenderer stays in preload closures, the main process pins privileged channels to the sender frame, the renderer config carries no credentials, and session permission handlers grant devices only to trusted requesters |
Key Outcomes:
- Eliminated daily re-authentication issues
- Token cache bridge that passes values to
localStorage, with an in-memory fallback when storage is full - Configurable refresh intervals
- Support for Microsoft Identity Broker versions ≤ 2.0.1 and > 2.0.1
- PII sanitization with zero dependencies, UUIDs correlatable for debugging
- Graph API token reuse needs no app registration or admin consent, but caps scopes at what Teams web already holds (
/me/presencereturns 403) - Three 2026 advisories (GHSA-3vg9, GHSA-6xpg, GHSA-58j7) closed by moving trust out of the shared renderer world; a navigation lock in front of the preload is the remaining follow-up
Screen Sharing
| ADR | Title | Summary |
|---|---|---|
| 001 | DesktopCapturer Source ID Format | Use screen:x:y format throughout screen sharing pipeline for Wayland compatibility |
| 008 | useSystemPicker Feature for Electron 38 | Rejected OS native picker due to incomplete Linux Wayland/PipeWire support |
Key Outcomes:
- Fixed Wayland screen sharing preview
- Standardized source identification
- Improved cross-platform compatibility
- Deferred native picker until Linux support available
Linux Desktop & Display Server
| ADR | Title | Summary |
|---|---|---|
| 031 | Keep the --ozone-platform=x11 Default on Wayland | Ship --ozone-platform=x11 as the default on deb, rpm, AppImage and snap; #2506 was reverted the same day as an accidental merge, and #2601 was closed unmerged after a regression, with concrete reopen triggers recorded. Superseded by 034 except snap |
| 034 | Native Wayland by Default on deb, rpm and integrated AppImage | Drop the packaged --ozone-platform=x11 on deb, rpm and AppImage on the Electron 44 baseline; snap keeps it. Answers ADR-031's reopen triggers and names the GNOME multi-monitor case as the open risk |
Key Outcomes:
- deb, rpm and integrated AppImage follow the session backend, like Flatpak and tar.gz; the snap keeps
--ozone-platform=x11 electronCLIFlagscannot override the flag; only a genuine command-line or.desktopoverride can- ADR-016 matrix, GNOME and KDE two-monitor checks all passed on the PR build; Enterprise Linux 8 (GTK 3.22) needs the documented
.desktopoverride
Testing & Quality
| ADR | Title | Summary |
|---|---|---|
| 009 | Automated Testing Strategy | Smoke testing with Playwright; comprehensive testing impractical due to MS authentication constraints |
| 016 | Cross-Distro Testing Environment | Docker-based manual testing across 9 distro/display server combinations via noVNC, hosted on GitHub Codespaces |
Key Outcomes:
- Playwright E2E smoke tests validate app launch and login redirect
- Tests run in isolated temp directories for clean state
- Manual testing remains primary quality gate for feature changes
- Low maintenance approach suitable for volunteer-maintained project
- 9 cross-distro configurations testable from a browser via Codespaces
- Apple Silicon limitation documented (V8 4GB heap cap under Rosetta 2)
Performance
| ADR | Title | Summary |
|---|---|---|
| 026 | Performance Audit Outcomes | Closes the system performance research: outcomes for all ten findings, timeout-budget offline detection, no instrumentation module |
Key Outcomes:
- All ten audit findings closed with explicit outcomes and reopen triggers
- Offline detection bounded by a 20 s budget that assumes online on exhaustion
- MutationObserver consolidation rejected; scope-narrowing and polling reduction reserved as first levers
- No performance instrumentation, deliberately
Documentation & Standards
| ADR | Title | Summary |
|---|---|---|
| 004 | agents.md Standard Investigation | Investigated and rejected agents.md standard while no tool read it; superseded by ADR-036 |
| 036 | Adopt AGENTS.md as the Agent Instruction File | Renamed CLAUDE.md to AGENTS.md once Claude Code read it natively (v2.1.277+); no stub or symlink, because a CLAUDE.md makes Claude Code ignore AGENTS.md |
| 025 | Configuration Option Naming Convention | Nesting criteria, positive naming, and the resolved flat-to-nested rename mapping for configuration options |
| 029 | Configuration Schema as Single Source of Truth | One-schema-three-consumers thesis: app/config/options.js feeds the generated docs, the docs explorer, and startup validation |
Key Outcomes:
- Consolidated instruction files (removed 28% duplication)
- Centralized markdown standards in contributing.md
- Single vendor-neutral
AGENTS.mdinstruction file, owned by ADR-036 - Configuration option naming convention and rename mapping owned by ADR-025
- Configuration schema treated as single source of truth for generated docs, the docs explorer, and startup validation, owned by ADR-029
Release Process & Automation
| ADR | Title | Summary |
|---|---|---|
| 005 | AI-Powered Changelog Generation | Use Gemini 2.0 Flash for automated changelog generation with release-pr workflow |
| 017 | Use workflow_run for PR Artifact Comments | Move PR artifact commenting to a workflow_run-triggered workflow to support fork PRs |
| 018 | Issue Triage Bot GitHub App Migration | Migrate triage bot from in-repo GitHub Actions to standalone Go service as a GitHub App |
| 023 | Release Automation Tooling | Adopt release-please for conventional-commit driven versioning, rejecting release-it and Beads |
Key Outcomes:
- Decoupled merging from releasing
- AI-generated concise changelog entries (60 chars avg vs 165 manual)
- Quality score: 9.0/10 on validation testing
- Zero cost (uses Gemini API free tier)
- Fork PRs receive artifact download comments without 403 permission errors
- Issue triage bot ran as a standalone GitHub App with no in-repo workflow files until it was retired on 2026-11-07
Community & Metrics
| ADR | Title | Summary |
|---|---|---|
| 019 | Repository Activity Dashboard | Use Repobeats for embeddable repo activity visualization in README and docs |
Key Outcomes:
- Repobeats SVG embed added to project README for at-a-glance activity stats
- Zero maintenance: hosted service updates automatically
- No CI/CD cost or GitHub Actions minutes consumed
MQTT & Integration
| ADR | Title | Summary |
|---|---|---|
| 006 | CLI Argument Parsing Library | Keep yargs for config parsing, use MQTT for action commands instead of CLI subcommands |
| 007 | Embedded MQTT Broker | Rejected bundling Aedes broker - users still need client tools, better alternatives exist |
| 033 | Opt-in D-Bus Control API | Fixed named Teams actions and observed state on the Linux user session bus, behind dbusControl.enabled, through a transport-neutral control service; MQTT stays independent |
Key Outcomes:
- Avoid fragile CLI argument bypass layer
- MQTT commands provide clean architecture for external triggers
- Users provide own MQTT broker (localhost or Home Assistant)
- Same-machine integrations (Stream Deck, headset bridges, busy lights) use the D-Bus API with no broker; the HTTP server idea from ADR-007 was not needed
UI Features
| ADR | Title | Summary |
|---|---|---|
| 010 | Multiple Windows Support | Rejected multi-window in 2025; superseded by 032 after the web app was shown to allow concurrent instances |
| 032 | Opt-in Secondary Window for the Same Account During Calls | Opt-in second BrowserWindow on the same partition so a call can live in one window while the other stays a full client; meeting links and a calendar-based join route to it, no DOM hooks, the call itself is never moved |
| 014 | Quick Chat Deep Link Approach | Use People API + Deep Links for quick chat access after Chat API was blocked |
| 015 | Quick Chat Inline Messaging | Hybrid Teams commanding + Graph API approach for inline message sending |
| 020 | Multi-Account Profile Switcher | WebContentsView-based profile switching with feature-flag gating |
| 022 | Custom Notification Toast Scope | Keep the opt-in custom toast, drop the Phase 2 notification centre as unverifiable |
Key Outcomes:
- Quick chat access via People API (works) instead of Chat API (blocked 403)
- Inline message sending via Graph API ChatMessage.Send scope
- Chat resolution via Teams entityCommanding + DOM scanning + member verification
- Keyboard shortcut toggles quick chat modal
- Multi-account profile switcher shipped Phase 1 from v2.9.0; Phase 2 in progress
Distribution & Packaging
| ADR | Title | Summary |
|---|---|---|
| 011 | AppImage Update Info | Post-process AppImages with appimagetool to embed update info for third-party update managers |
Key Outcomes:
- Third-party tools (Gear Lever, AppImageUpdate) can detect and manage updates
- Delta updates via
.zsyncfiles reduce bandwidth - Both electron-updater and AppImage update info coexist
- Adds ~2-3 minutes to CI build time
Creating New ADRs
When to Create an ADR
Create an ADR for decisions that:
- Have significant architectural impact
- Affect multiple modules or systems
- Involve trade-offs between alternatives
- Need to be explained to future contributors
- Change existing patterns or conventions
ADR Template
Use this template for new ADRs (save as docs-site/docs/development/adr/00X-your-title.md):
---
id: 00X-your-title
---
# ADR 00X: [Title - Short Noun Phrase]
## Status
[Proposed | Accepted | Implemented | Rejected | Superseded by ADR-XXX]
## Context
What is the issue we're trying to address? Include:
- Problem description
- Why this needs a decision now
- Technical background and constraints
- What we investigated or researched
## Decision
What did we decide to do? Be specific:
- Exact approach chosen
- Implementation strategy
- Key parameters or configurations
## Consequences
What are the impacts of this decision?
### Positive
- Benefits gained
- Problems solved
- Improvements delivered
### Negative
- Trade-offs accepted
- Limitations introduced
- Future constraints
### Neutral
- Implementation notes
- Maintenance considerations
- Migration requirements (if applicable)
## Alternatives Considered
What other options did we evaluate and why were they not chosen?
### Option 1: [Name]
- Description
- Pros
- Cons
- **Why rejected**: [Specific reason]
### Option 2: [Name]
- ...
## Related
- ADR-XXX: [Related decision]
- Issue #XXX
- PR #XXX
ADR Naming Conventions
- Number: Sequential (001, 002, 003, ...)
- Title: Short, descriptive noun phrase
- Filename:
00X-lowercase-with-hyphens.md
Examples:
- ✅
001-desktopcapturer-source-id-format.md - ✅
002-token-cache-secure-storage.md - ❌
001-screen-sharing-bug-fix.md(too vague) - ❌
001-ImplementDesktopCapturerFix.md(wrong case)
ADR Workflow
- Create draft ADR with "Proposed" status
- Discuss with maintainers (GitHub discussion or PR)
- Update status to "Accepted" or "Rejected" based on outcome
- Implement (if accepted)
- Update status to "Implemented" when deployed
- Add to this index in the appropriate topic category
ADR Maintenance
Updating Existing ADRs
- Status changes: Update when implementation completes or decision is superseded
- Consequences: Add learned lessons or unexpected outcomes after implementation
- Version notes: Add when decision affects specific releases
Superseding ADRs
When replacing an old decision:
- Create new ADR documenting the new approach
- Update old ADR status to:
Superseded by ADR-XXX - Link new ADR to old one in "Related" section
- Explain in new ADR why the old approach was replaced
Example Supersession
## Status
~~Accepted~~ → Superseded by [ADR-008](008-new-approach.md)
**Note**: This approach was replaced in November 2025 due to [reason].
See ADR-008 for the current implementation.
Best Practices
Writing Good ADRs
✅ Do:
- Write for future readers who don't have your context
- Explain the "why" more than the "what"
- Document alternatives considered
- Include specific examples and code references
- Update ADR when you learn something new post-implementation
❌ Don't:
- Write implementation documentation (that belongs in module READMEs)
- Skip the consequences section
- Forget to add links to related issues/PRs
- Leave status outdated (update when implemented)
ADR Size Guidelines
- Minimum: ~200 words (if shorter, might not need an ADR)
- Typical: 500-1000 words
- Maximum: No hard limit, but consider splitting if >2000 words
Code References
When referencing code in ADRs:
**Implementation**: `app/browser/tools/tokenCache.js`
**Configuration**: See `config.json` → `tokenRefreshInterval`
**IPC Channel**: `token-refresh:trigger`
ADR Statistics
The Status Overview table above is the single source of truth for how many records exist and where each stands; counts are not repeated here so they cannot drift. The topics are the sections under By Topic.
Research Notes
Active investigations live in docs-site/docs/development/research/ while they are open, as plain markdown with a date, scope and recommendation. Once the question is decided, whether the feature shipped, was rejected or is parked, the decision moves into an ADR (new or updated) and the research document is deleted; the ADR's Related section names the deleted file so git log --all -- <path> recovers the full investigation. The directory does not exist while nothing is open, which has been the case since 2026-09; recreate it for the next spike.
Related Documentation
- Contributing Guide: Development Guidelines
- Module Documentation: Module Index
- Development Roadmap: Future Plans
- Configuration Reference: Configuration Options
Questions?
- "Should I create an ADR for this?" → If you're asking, probably yes. When in doubt, create one.
- "Where do implementation details go?" → Module READMEs. ADRs explain "why", READMEs explain "how".
- "Can I update an old ADR?" → Yes! Add consequences learned or update status. Don't rewrite history, but do add learnings.
- "What if my decision was wrong?" → Document it! Create a new ADR explaining why you're changing course. This is valuable learning.