open-swe/agent/dashboard
Johannes du Plessis 5d033c7548
fix: clearer Slack prompt for users who must sign in with GitHub (#1380)
* fix: clearer Slack prompt for users who must sign in with GitHub

The Slack gate labeled any mapped-but-tokenless user as having an
"expired or revoked" authorization, keyed off whether a *mapping* row
existed. Most blocked users are team members in the legacy hardcoded
mapping who have simply never completed a dashboard GitHub login, so the
message was misleading and steered them toward reconnecting Slack (which
never creates a token).

Base the prompt on whether an oauth_tokens *record* exists:
- no record  -> ask the user to sign in with GitHub and connect Slack
- record but unusable -> ask the user to sign in with GitHub again

Add has_access_token_record() to distinguish the two cases.

* fix: guard token-record check so a store failure still prompts sign-in

The has_access_token_record() lookup ran outside the defensive handling
around token resolution. If the store read fails it would raise before
posting the sign-in prompt and clearing the Slack assistant status.
Wrap it like get_valid_access_token: on failure, default to the
sign-in/connect prompt.
2026-06-02 19:39:44 -07:00
..
__init__.py feat: open-swe dashboard for per-user profile config (#1302) 2026-05-15 11:23:53 -07:00
admin.py feat: open-swe dashboard for per-user profile config (#1302) 2026-05-15 11:23:53 -07:00
agent_overrides.py feat: Store-backed GitHub/Slack user mapping (self-service + admin) (#1369) 2026-06-01 14:37:19 -07:00
analyzer_cron.py feat: outcomes dataset + bootstrap/continual split via skills (#1365) 2026-06-01 13:25:12 -07:00
enabled_repos.py feat: restructure Open SWE Review tab + wire create_prs (#1319) 2026-05-21 09:17:07 -07:00
message_adapter.py feat: add Agents chat UI for cloud threads (#1323) 2026-05-22 18:15:59 +00:00
oauth.py feat: open Slack-triggered PRs as the triggering user (#1375) 2026-06-02 15:04:20 -07:00
options.py feat: upgrade default agent + reviewer model to Opus 4.8 (#1350) 2026-05-28 10:59:29 -07:00
profiles.py fix: clearer Slack prompt for users who must sign in with GitHub (#1380) 2026-06-02 19:39:44 -07:00
review_style_jobs.py feat: outcomes dataset + bootstrap/continual split via skills (#1365) 2026-06-01 13:25:12 -07:00
review_styles.py feat: outcomes dataset + bootstrap/continual split via skills (#1365) 2026-06-01 13:25:12 -07:00
routes.py feat: open Slack-triggered PRs as the triggering user (#1375) 2026-06-02 15:04:20 -07:00
slack_oauth.py feat: open Slack-triggered PRs as the triggering user (#1375) 2026-06-02 15:04:20 -07:00
team_settings.py fix: include reviewer trace links (#1351) 2026-05-28 13:48:14 -07:00
thread_api.py fix: resolve dashboard run email from GitHub mapping, not OAuth profile (#1372) 2026-06-01 15:47:53 -07:00
user_mappings.py feat: open Slack-triggered PRs as the triggering user (#1375) 2026-06-02 15:04:20 -07:00