Repository navigation
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a new per-profile User-Agent capability and changes the runtime identity of Electron preview tabs when users select Chrome compatibility. Existing defaults remain intact and the option is tested and reversible, but the production implementation spans files primarily maintained by other contributors, so human review is warranted. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughBrowser profiles now support an optional Native or Chrome User-Agent mode. Settings expose the choices for eligible profiles, and hosted webviews apply the selected mode to the browser’s current User-Agent. ChangesPer-profile User-Agent modes
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant User
participant IntegrationsSettings
participant ClientSettings
participant HostedBrowserWebview
participant browserProfileUserAgent
participant Webview
User->>IntegrationsSettings: Select a profile User-Agent mode
IntegrationsSettings->>ClientSettings: Update the profile mode
HostedBrowserWebview->>ClientSettings: Read the selected profile mode
HostedBrowserWebview->>browserProfileUserAgent: Pass current User-Agent and mode
browserProfileUserAgent-->>HostedBrowserWebview: Return resolved User-Agent
HostedBrowserWebview->>Webview: Set useragent attribute
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The per-profile choice appears mergeable after normal checks. The reported Teams result covers fresh sign-in only, not authenticated sessions or other desktop platforms. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change is opt-in for custom profiles and preserves existing defaults. It changes how websites identify the preview without changing its session selection or local privileges. No introduced security concern was identified in the inspected paths, but external sign-in behavior and interruption scenarios were not runtime-validated. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
Full details: ApprovabilityExplanation This PR adds a user workflow:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
The Approvability requirement is acknowledged. This adds an opt-in per-profile control and therefore needs maintainer review under the repository review policy. The focused configuration exception in CONTRIBUTING.md concerns submission eligibility; it does not waive that review. CodeRabbit reported no actionable code comments and passed the linked-issue and scope checks. I kept the implementation at The existing verification remains attached: 38 focused tests, affected-package typechecks, real Electron webview identity/session checks, and the isolated Teams entry-point reproduction without credentials. Authenticated Teams sessions, other desktop platforms, and live Turnstile challenges remain untested. |
|
The five
Could a maintainer with write access approve the pending workflows for this fork PR? GitHub's approval procedure explains the required action. My contributor account has read access to the upstream repository and cannot grant that approval. The local verification and Electron/Teams evidence remain attached to the PR description. Upstream CI remains unverified until it runs. This workflow approval is separate from the maintainer code review required by CodeRabbit and Macroscope's Approvability checks. |
The desktop preview exposes Electron in its User-Agent, which sends the Teams Web entry point to the retired Classic Teams page in a fresh macOS reproduction. Removing the app/Electron tokens reaches the Microsoft sign-in form. Profiles currently offer no way to choose that identity without changing T3's native default globally.
Add an optional
native/chromeidentity mode to custom browser profiles. The desktop profile menu offers Native (default) and Chrome compatibility. The override is applied when the Electron webview attaches, so the menu tells users to reopen tabs. The running Chromium version and platform stay intact; the setting changes neither the browser engine nor User-Agent Client Hints. Returning to Native restores the exact original string. Existing settings and built-in profiles keep their native behavior.Closes #16616.
Scope
This uses the focused configuration exception in CONTRIBUTING.md: it controls the identity of the existing desktop preview within existing browser profiles. It adds no browser-host workflow and changes no product default. The control is desktop-only; web/mobile retain the optional profile field without offering an Electron control, and server-rendered tabs are unaffected. Existing agents/providers continue to use the same preview tabs.
#7110 and #5002 established why the native default must stay. The Chrome mode is opt-in and reversible per custom profile. It does not claim to resolve embedded-browser account policies such as #14815.
Review status
CodeRabbit reported no actionable code comments and passed the title, description, linked-issue, and scope checks. Its Approvability rule requires maintainer review because this adds a per-profile user control; Macroscope also requires human review on eligibility grounds. The focused configuration exception makes the proposal eligible for submission, but does not remove those review requirements. The implementation and commit remain unchanged.
Verification
vp test run packages/contracts/src/browserProfile.test.ts apps/desktop/src/settings/DesktopClientSettings.test.ts apps/desktop/src/preview/BrowserSession.test.ts apps/web/src/browser/HostedBrowserWebview.test.tsx: 38 tests passed in four files. These cover legacy settings, allowed modes, current Chromium/platform tokens, exact Native restoration, default/profile isolation, disk persistence, native session permissions, and settings hydration before webview attachment.typecheckfor@t3tools/contracts,@t3tools/web, and@t3tools/desktop: passed. File-scoped lint/format checks passed; four existing warnings remain in unchanged lines.<webview>guests using the helper bundled from this branch: all seven checks passed. Request-header andnavigator.userAgentidentities matched, default Native stayed intact, Native/Chrome switching after reopening retained a fictional cookie, and a different profile stayed isolated. Native results./error/eoaand displayed “Classic Teams is no longer available”; Chrome compatibility reached the Microsoft sign-in form. Sanitized results. An authenticated Teams session, other desktop platforms, and live Turnstile challenges were not validated. The original report's external-app launch was not reproduced in these isolated runs.Before / after
Before: upstream profile menu has no User-Agent control.
After: explicit per-profile identity and reopen guidance; Chrome remains selected after client restart.
Native remains available for reverting the profile.
Evidence is hosted as release assets in the contributor fork and is not committed to this PR. The images show a fictional Teams profile in isolated test state.
Prepared with GPT-6.1-Sol using Codex in T3 Code.