Repository navigation
fix(google): Open calendar event links in the viewer's Workspace account - #2682
Merged
Merged
Conversation
Event links from Google open in the browser's default Google account, which is often a personal one. Add authuser=<requester email> to every event link the calendar tools return, so the link opens the requester's work account. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
A link shared in a Slack thread is seen by everyone, so authuser with the requester's email sends other viewers to the wrong account. Wrap event links in AccountChooser with hd set to the domain of Junior's own Google account, which is the same for every viewer. Co-Authored-By: BYK <[email protected]>
BYK
requested changes
Nov 4, 2026
BYK
left a comment
Member
There was a problem hiding this comment.
Nice but it still gets the domain from the requester email, right? It should derive it from the account Junior is using for Google as that's assumed to be the right company account.
Technically, they are almost always on the same company domain but this way should save you from keeping track of the requester everywhere and make it more "accurate", right?
BYK
marked this pull request as ready for review
November 4, 2026 20:46
BYK
approved these changes
Nov 4, 2026
BYK
added a commit
that referenced
this pull request
Nov 4, 2026
**Failure:** When a reviewer asks Junior a question in a pull request review or comment, Junior answers in the Slack thread or web Conversation that created the Watch, never on GitHub. Example: the changes-requested review on #2682 asked a question, and Junior posted no GitHub comment. **Root cause:** A Watch turn's reply goes only to the Conversation. Nothing told the agent to answer where the question was asked, and Watch instructions often say "Otherwise stay silent". Plugin event guidance cannot fix this, because the task input scopes it as "does not replace or expand" the instructions. **Fix:** The Watch reply contract in `task-input.ts` now says: when an Event asks a question, answer it where it was asked with that provider's tool, then reply in the Conversation with the answer and a link. The rule is provider-neutral. For GitHub, the `github_submitPullRequestReview` description says to use event `COMMENT` to answer a question. **Remaining risk:** No existing tool replies inside an inline review thread, so an inline question gets its answer as a `COMMENT` review, not as a thread reply. The model decides what counts as a question. No eval covers it yet. <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3A3ee1f99a8027cbdb43eb2584 --> -- [View Session in Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A3ee1f99a8027cbdb43eb2584/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failure: Calendar event links that Junior shares (
https://www.google.com/calendar/event?eid=...) open in the browser's default Google account. For people who are also signed in to a personal account, that is often the wrong account, so the event does not open.Fix: A new helper,
accountChooserLink, wraps each event link ashttps://accounts.google.com/AccountChooser?hd=<domain>&continue=<event link>. It builds the link withURL/searchParams, so the original event link stays unchanged insidecontinue. It runs on every event link that the calendar tools return or put in an object card: create, update, cancel (throughownEventResult), and list.parseEventIdreads the event id fromcontinue, so people can paste a shared link back in.Why one shared domain: Everyone in a Slack thread sees the same link. With
authuser=<requester email>, the link works for the requester only, and every other viewer goes to the wrong account. So the domain comes fromGOOGLE_WORKSPACE_ACCOUNT_EMAIL, which is Junior's own Google account and the organizer of its events. It is the same for every viewer. When that domain is a consumer one (gmail.com,googlemail.com), when the URL is not an event link, or when it already goes through AccountChooser, the link does not change.Why AccountChooser: Verified by manual test:
https://accounts.google.com/AccountChooser?hd=<domain>&continue=<event link>worked and went straight to the event.https://www.google.com/calendar/hosted/<domain>/event?eid=<eid>also worked.hd=<domain>on the event link,authdomain=<domain>,login_hint=<email>, and the/calendar/u/<email>/eventpath did not switch the account.authuser=<email>worked only for that one person.The hosted path also works. AccountChooser was chosen because it went straight to the event in the test. When it cannot pick an account, the requester expects it to show an account picker. That fallback is not verified.
via @BYK.
--
View Session [Sentry]