Skip to content

feat(slack): reconnect slack in place so saved credentials apply - #32304

Merged
bolichen97 merged 1 commit into
mainfrom
fix/10306-slack-reconnect
Nov 10, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/10306-slack-reconnect

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Slack credentials saved from Settings take effect with one click, without restarting the gateway.

Slack's tokens and owner ID are read once, when the gateway starts. Saving new ones from Settings → Messaging Channels → Slack writes them to the credential store, but the running Slack connection keeps the old ones, and the panel's only advice is "restart the gateway". A restart re-executes the whole process, so every running agent turn, task step and cron is torn down to redo one websocket handshake.

Why it matters

First-run Slack setup is where a token typo or a missing owner ID happens. The issue's reporter ran for hours with no Slack connection because the owner ID was missing at boot; re-entering it in Settings reported success and changed nothing. With Reconnect, the fix is one click and the outcome shows on the same screen.

Not a goal

  • Changing POST /api/restart, or the slash command's restart requirement (it is registered in the Slack app manifest).
  • Applying credentials automatically on save. Reconnect is an explicit click, so a half-typed token is never applied by accident.
  • Switching Slack workspaces in place. A token for another workspace is refused with "restart the gateway to switch workspaces".
  • Changing the owner ID in place. Every queued, held or running Slack message was admitted under the current owner, so Reconnect refuses a different one with "restart the gateway to change the owner".
  • Registry channels (Discord, Telegram, ...). They already restart in place.
  • Dashboard sends to Slack during a reconnect. A dashboard reply or Slack mirror that lands in the reconnect window still reads the cleared client and is skipped; making those sends wait or say "not delivered" touches about 20 dashboard files and is deferred to Dashboard sends to Slack wait for a running reconnect or say not delivered #32559.
  • A code-channel turn that spans a reconnect keeps its Working status in Slack after it ends: the new client's status driver has no record of the turn. Deferred to Code-channel status clears through the new client after a Slack reconnect #32753.

What changed (motivation → approach → change)

A saved Slack credential needed a full restart because the tokens are read once and the socket start returns early on a sticky "disabled" flag. This PR adds one action that redoes only the Slack part of a restart, in place.

Part What it does
POST /api/slack/reconnect Reads the saved credentials, closes the current socket, re-reads the tokens, and runs the same socket start boot runs. Same guards as the save: dashboard token, CSRF, direct-local only. Answers {connected, connect_error}, the pair the Slack config read already reports. A saved owner ID that differs from the one the gateway authorizes is refused before anything is torn down ("restart the gateway to change the owner"): every queued, held or running Slack message was admitted under that owner. A gateway with no owner yet takes the saved one.
Reconnect button (SlackPanel.tsx) In the panel header, and beside the save confirmation after a credential save ("Saved. Click Reconnect to apply."). Shows "Reconnecting…", then "Connected to Slack." or "Reconnect failed: ", worded like the recorded boot failure. Any connect_error is shown as a failure, even when the old connection stayed up, and a later credential save clears the last outcome.
No workspace switch (slack/reconnect.py) Queued and in-flight work names the current workspace's channels, so the gateway pins that workspace. A token for another workspace is refused before anything is torn down. Another token reconnects only when both workspaces are named and match: while the pinned one cannot be named (its boot check failed), or when Slack cannot name the new token's (a bad token, a timeout), the attempt is refused with Slack's reason and the working connection stays up. The token the pin was taken for is kept apart from the live one, so clearing the bot token in between cannot lock Reconnect out. An org-wide Enterprise Grid install, which has no team_id, is pinned by its enterprise_id.
Work held across a reconnect (slack/events_queue.py, slack/events.py, slack/gateway_runtime/result_egress.py) While a reconnect runs, Slack queue drains, inbound messages with files and Slack-bound results wait and then use the new client. A code-channel message is gated, bound and routed with the client the route started with (slack/code_channels/routing.py), so a reconnect mid-route cannot drop it; one that arrives with no client waits for the attempt, or gets the undelivered notice in a bound channel. If the reconnect fails and Slack stays down for 5 minutes, each held message leaves its queue and the owner gets one dashboard notice naming the channel and quoting the message.
Save response PUT /api/slack/config returns reconnect_required for a token write or a first owner ID, and restart_required for replacing the owner the gateway already uses, or for the slash command.

A reconnect re-runs the enterprise workspace check; while its auth.test runs, an armed workspace allowlist and the bot's own identity stay in force (slack/enterprise.py) instead of reading as open; it runs under the dashboard config lock, and an allowlist reload waits for it, so neither a rolled-back save nor an older read can widen the list. The save row says restart, without offering Reconnect, whenever the save needs one. The rest is wiring: boot keeps its duplicate-event cache and publishes the reconnect hook once its own connect finished (slack/gateway_runtime/service_boot.py, orchestrator_init.py, slack/gateway.py, dashboard/state_parts/dashboard_state.py, dashboard/handlers/, dashboard/routes/messaging.py), and a reconnected client gets the agent-session status driver boot attaches (slack/agent_sessions/status.py). The voice and file paths read the published client once (slack/events_voice.py, slack/files.py). The gateway's log line for a changed Slack credential points at Reconnect (slack/gateway_runtime/channel_lifecycle.py). slack/enterprise.py and test/test_enterprise.py are black-formatted, so .github/black-baseline.txt stops listing them. The client gains reconnectSlack (website/src/api/client/messaging.ts). The catalogs under website/src/i18n (en.manual.json, the translated locales, the regenerated en-XA.json, en.context.json) gain the new strings and drop four restart-only ones. docs/system-specs/modules/messaging.md, docs/system-specs/modules/slack-gateway.md and docs/feature-map/README.md describe the route, and the user guide src/kiro_crew/docs/slack-integration.md says new tokens apply with Reconnect and a changed owner ID still needs a restart.

Builds on #25780 by @CrysisDeu, rebased onto current main. Against that PR's last head, a different token is refused while either workspace is unnamed, and a refusal that left the connection up reads as a failure in the panel and in the slack.reconnect access log.

Backwards compatibility

Compatible: one new POST route and one new response field (reconnect_required). A client that reads only restart_required sees false for a credential save, and the restart it would have offered is no longer needed. POST /api/restart is unchanged. No config, schema or file on disk changes.

Reader: website/src/pages/settings/SlackPanel.tsx:slackPanel.slack_connection_failed_at_startup, slack_rejected_the_stored_tokens_invalid_auth_re, tokens_are_saved_but_not_yet_active_restart_the, verified_with_slack_and_saved_restart_the_gatewa -- crew page -- the only reader on main; this PR replaces those strings with the Reconnect wording, so no other file reads the removed keys

Tests

  • test/test_slack_reconnect.py (new): the handshake re-reads the tokens and publishes a client only behind a connected socket; each named decline; an unreadable store changes nothing; a token for another workspace is refused before teardown; with the pinned workspace unnamed, or with a new token Slack cannot name, another token is refused and the connection stays up, while the pinned token reconnects, even after a save cleared the bot token in between; an org-wide Grid install is named by its enterprise_id, and any other auth.test answer without a team_id still fails; a channels-policy deny closes the socket it built; concurrent clicks share one attempt; work queued across a failed reconnect is held, then delivered with the new client or reported to the owner after the window; the route's 403/503/500 answers and that a refusal with the connection up is logged as an error; a saved owner change (or removal) is refused with the connection left up, a token-only save reconnects in place, and a gateway with no owner yet takes the saved one.
  • test/test_slack_code_channels_routing.py: a reconnect that clears the client mid-route still adopts, binds and routes the code-channel message.
  • test/test_slack_events_coverage_route_flow.py: a code-channel message that arrives with no client waits for the reconnect and its gate and dispatch use the new client, or it is reported undelivered when the attempt fails; a reconnect mid-route keeps the gate and dispatch on the route's client; a voice memo held for a reconnect is still answered by voice.
  • test/test_ssm_loopback_trust_sites.py: the new direct-local gate is listed.
  • test/test_enterprise.py: a re-validation keeps an armed allowlist while it probes, and stays default-open with none.
  • website/src/test/SettingsSlackPanelCoverage.test.tsx (owner): verified tokens saved with an owner change say restart and offer no Reconnect; the owner-change decline is explained.
  • test/test_slack_config_handlers.py: a token save and a first owner ID on a gateway with none flag reconnect_required; replacing the gateway's owner and a command change flag restart_required.
  • website/src/test/SettingsSlackPanelCoverage.test.tsx: the Reconnect button's pending, success and failure states, each named decline, a refusal that left the connection up shown as a failure, a later credential save clearing the last outcome, the save-row button, and the read-only view.
  • Fakes in test/test_slack_events_coverage_route_flow.py, test/test_stop_clears_only_its_own_sender_slack.py, test/test_slack_agent_session_stop.py, test/test_slack_gateway_more_coverage.py, test/test_handlers_messaging_composition_contract.py and website/src/test/ApiClient.refactor.surface.test.ts follow the new names.

Determinism: test/test_slack_reconnect.py ran 3 times under -n 4 and once serially in a seeded shuffled order, all green; the owner-save tests in test/test_slack_config_handlers.py ran 20 times at -n0 and 10 times at -n 4 beside test/test_slack_reconnect.py and test/test_enterprise.py, and the whole file once in a shuffled order (seed 7583), all green; the held voice-memo test in test/test_slack_events_coverage_route_flow.py ran 20 times at -n0 and once at -n 4 beside the other Slack tests, and its whole file once in a shuffled order (seed 4127), all green; SettingsSlackPanelCoverage.test.tsx ran twice, green. The new tests fail with their fix reverted.

Manual verification

The panel ran from this PR's head on an isolated gateway (screenshots below): a first owner ID saved on a gateway with none got reconnect_required: true and restart_required: false from the real save route. Slack itself was not reachable, so the route, the handshake and every refusal are driven through the real code by unit tests with Slack's client faked.

Screenshots / video

Before (main): the recorded failure says to restart the gateway, and there is no Reconnect.

Before: invalid_auth recorded, notice says restart the gateway, no Reconnect button

After, from this PR's head on an isolated gateway. Slack's answers are faked in the browser; the first-owner save goes to the gateway itself.

After: the recorded failure points at the header Reconnect button.

After: invalid_auth recorded, Reconnect button beside the status pill, notice says click Reconnect

After: pending, the button reads Reconnecting… and is disabled.

After: Reconnecting… disabled, no stacked notice

After: a decline, labelled as the click's outcome.

After: Reconnect failed: Slack rejected the stored tokens (invalid_auth)…

After: connected.

After: Connected pill and Connected to Slack.

After: saved tokens that are not live yet point at Reconnect.

After: Tokens are saved but not yet active. Click Reconnect to connect.

After: a first owner ID saved on a gateway that has none says to click Reconnect, with the button beside the confirmation. The gateway answered reconnect_required: true, restart_required: false.

After: Saved. Click Reconnect to apply. with a Reconnect button in the save row

Related Issues

Closes #10306

Builds on #25780 by @CrysisDeu.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of d0d50ddf64cbae237eaf84e8bf3e55bc7c28b827 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

No design-level blocker. A Slack-only reconnect fixes the real cause (tokens are read once at boot), and the refusals for a workspace switch or owner change stop queued work from being sent to the wrong workspace or owner.

Notes

[DESIGN-REVIEWED] d0d50dd

Description read

[DESCRIPTION-READ] 111a920ed9736acd56c34de262c1fa255125139fcff8d7e6911eb1e7e0959454

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of d0d50ddf64cbae237eaf84e8bf3e55bc7c28b827 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Every item has a named harm and nothing blocks. The hold, give-up and notice machinery only exists because Reconnect closes the old socket before the new one connects.

Notes

  • Item 5–6 — oversized: they come from the choice to close first, stated as "close the current socket client and stop publishing its Web API client" before the hoist and connect (slack/reconnect.py docstring, step 2). That ordering leaves a window where orch.slack is None, and hold_if_slack_down, resume_held_slack_drains, give_up_held_slack_work, notify_slack_undelivered, wait_for_reconnect and the client threading in code_channels/routing.py exist to cover it. Subtraction: connect the new client first and swap orch.slack only once it is connected. With no gap, those helpers, the 5‑minute HELD_WORK_GIVE_UP_SECS window and the undelivered notice can all be deleted. Clears when: the mechanism is removed, or a human amends the Goal.

What this change ships

Inventory (10 items) — 8 justified

Intent: let a person apply Slack credentials saved in Settings with one click instead of restarting the gateway. ADDITION.

  1. Reconnect button in the Slack panel header and next to the save confirmation — justified
  2. New POST /api/slack/reconnect route, guarded the same way as the save — justified
  3. Save confirmation says "Click Reconnect to apply" instead of "restart the gateway" — justified
  4. Reconnect refuses a different workspace or owner and says to restart — justified
  5. Queue drains, file messages and Slack-bound results wait while a reconnect runs — oversized: only needed because the old socket closes first
  6. After a failed reconnect, held messages are dropped after 5 minutes and the owner gets a dashboard notice quoting each one — oversized: only needed because the old socket closes first
  7. PUT /api/slack/config returns a new reconnect_required field; restart_required is now false for token saves — justified
  8. Enterprise allowlist and the bot's own identity stay in force during the reconnect's auth.test — justified
  9. The log line for a changed .env Slack credential now points at Reconnect — justified
  10. Black baseline stops listing enterprise.py and test_enterprise.py — rides along

[FIRST-PRINCIPLES-REVIEWED] d0d50dd

Description read

[DESCRIPTION-READ] cb96217ed59a9406857bbd88c8ac6176b2452b4171b2a8b67b6eff910863d53f

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of d0d50ddf64cbae237eaf84e8bf3e55bc7c28b827 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: the blind reader read the Reconnect button, its in-progress, failed and success states, and the save-row offer correctly, and said they would use it.

Notes

  • reconnectBtn uses RefreshCw, and the token replace buttons in SecretField use RotateCcw. The blind reader could not tell them apart ("The circular arrow looks just like the Reconnect icon") and said they would not click the token buttons. Use a link/plug glyph for Reconnect, or drop the icon.
  • The header Reconnect stays at full weight while connected (shot-05), and the reader asked "Would it break the working connection?" Show it only when not connected, or show it muted once connected.
  • The slash_command_needs_restart line is not in any screenshot. It appears after a save that changes a token and the slash command together. Attach a shot of that save row.

[UX-REVIEWED] d0d50dd

Description read

[DESCRIPTION-READ] 66aaf6ba862db3c845770b650198d1896a847e6b6de954034b16f6caf62095d7

That sha256 names everything this verdict read: the PR description, plus the 10 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of d0d50ddf64cbae237eaf84e8bf3e55bc7c28b827 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] d0d50dd

False positive or not applicable? A repository writer can comment:
/ai-review override gpt d0d50ddf64cbae237eaf84e8bf3e55bc7c28b827 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed d0d50ddf64cbae237eaf84e8bf3e55bc7c28b827 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] d0d50dd

Verdict parsed from the review's SHA-scoped output markers for commit d0d50ddf64cbae237eaf84e8bf3e55bc7c28b827.

False positive or not applicable? A repository writer can comment:
/ai-review override fable d0d50ddf64cbae237eaf84e8bf3e55bc7c28b827 false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 force-pushed the fix/10306-slack-reconnect branch from 27e2a53 to 2eb33c8 Compare November 7, 2026 18:33
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, docs/system-specs/modules/messaging.md, src/kiro_crew/dashboard/handlers/init.py, src/kiro_crew/dashboard/state_parts/dashboard_state.py and the website i18n catalogs since this head went green (b764e20 -> 928d145); CI re-running.

The same push clears the three reds the old head showed against the newer main: the loopback-gate site count includes the new reconnect route (it uses is_direct_local_request, so it already refuses SSM requests), the credential-change log line names the real settings path (Settings → Messaging Channels → …), and the workspace-refusal log line no longer reads as a credential log to SAST (its arguments were always workspace IDs). The packaged user guide says new tokens and owner IDs apply with Reconnect.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/10306-slack-reconnect branch from 2eb33c8 to e5671f8 Compare November 7, 2026 20:35
@bolichen97

Copy link
Copy Markdown
Contributor Author

A local review found that dashboard senders reading DashboardState.slack_client (terminal delivery in turn_spec_hooks.py, mirror set-up in turn_dispatch_gates.py, and the other dashboard readers) skip a send that lands while a reconnect has the client cleared.
The fix makes those sends wait for a running reconnect or end in a "not delivered" notice, through one shared helper across about 20 dashboard files, so a maintainer deferred it out of this PR.
#32559 carries the task, an owner and a due date. The inbound route, code channels, queue drains and background results in this PR already wait for the reconnect.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/10306-slack-reconnect branch from e5671f8 to 6ecf56c Compare November 7, 2026 22:14
@bolichen97
bolichen97 force-pushed the fix/10306-slack-reconnect branch from 6ecf56c to 55d1b88 Compare November 8, 2026 01:14
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Refresh the pinned token after a successful rotation — fixed in 55d1b88

A connected reconnect now makes its own bot token the pin's token (reconnect._bring_up), so a later attempt with that token whose probe fails once is not refused as "another token".
The owner removal in the trigger no longer applies in place at all: Reconnect now refuses any owner ID change before teardown (owner_change_needs_restart) and the save asks for a restart, so a removed owner is never left authorized by a reconnect.
Red/green tests: test_a_rotated_token_becomes_the_pins_own_token, test_a_saved_owner_change_is_refused_and_asks_for_a_restart.

@bolichen97

Copy link
Copy Markdown
Contributor Author

A local review found that the replacement client's status driver has no record of a code-channel turn that started before the reconnect, so the turn-end clear is never sent and Slack keeps showing Working until its own timeout.
The fix carries the driver's outstanding records across a same-workspace client swap, a new contract with code_channels/status.py, so a maintainer deferred it out of this PR.
#32753 carries the task, an owner and a due date.

@bolichen97 bolichen97 closed this Nov 8, 2026
auto-merge was automatically disabled November 8, 2026 01:35

Pull request was closed

@bolichen97
bolichen97 force-pushed the fix/10306-slack-reconnect branch from 55d1b88 to 273fa43 Compare November 8, 2026 01:35
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 8, 2026
@bolichen97 bolichen97 reopened this Nov 8, 2026
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 8, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

This PR was closed for one minute by mistake: a push raced a local rebase and briefly set the branch to main's tip, so GitHub closed it as empty. It is reopened at 0439a04, the same reviewed change rebased onto current main. Nothing else changed.

@bolichen97
bolichen97 force-pushed the fix/10306-slack-reconnect branch from 0439a04 to cd4dba8 Compare November 8, 2026 02:13
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Revalidation can undo a completed workspace revocation — fixed in cd4dba8

enterprise._state_lock now serializes a validation with an allowlist reload: a reload waits for an in-flight validation and then reads the file as it is, so an older validation can no longer publish over a newer revocation (the reload no longer edits the hold at all).
The reconnect also runs its re-validation under the dashboard config lock every config writer takes, so it cannot read a save's intermediate file that the save then rolls back. Lock order is config lock, then _state_lock.
Red/green tests: test_a_validation_holds_the_state_lock_a_reload_takes, test_the_handshake_runs_under_the_dashboard_config_lock.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 8, 2026
Slack's tokens and owner ID were read once at gateway start, so a
credential saved from Settings needed a full gateway restart, which
tears down every running agent turn, task and cron. Add
POST /api/slack/reconnect and a Reconnect button in the Slack panel
that redo only the Slack handshake from the saved credentials.

A reconnect never switches workspaces: work already admitted names the
pinned workspace's channels, so a token for another workspace, or any
other token while the pinned workspace cannot be named, is refused
before the working connection is touched, and the panel shows the
refusal. Slack work that arrives while a reconnect runs is held and
delivered with the new client, or reported to the owner when Slack
stays down.

Builds on #25780.
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 10, 2026
@bolichen97
bolichen97 force-pushed the fix/10306-slack-reconnect branch from cd4dba8 to d0d50dd Compare November 10, 2026 07:20
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, docs/system-specs/modules/messaging.md, src/kiro_crew/dashboard/handlers/messaging.py, src/kiro_crew/dashboard/state_parts/dashboard_state.py, website/src/i18n/locales/en.manual.json and 29 more files this PR touches since this head went green (601aa4c -> 8f6fe6d); CI re-running.

Two conflicts, both kept on both sides: the settings panel's connection hint, where main added the missing-owner hint (#32577), and the queue entries in events.py / events_queue.py, where main added the voice-reply flag (#33670). The message this PR holds while a reconnect runs carries that flag too, with a test. The same push makes saving a first owner ID on a gateway that has none offer Reconnect instead of a restart (found by a local review), and the user guide says a changed owner ID, not a new one, still needs a restart.

[operator: bolichen97]

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 10, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve on d0d50dd. New POST /api/slack/reconnect re-reads saved Slack credentials and redoes only the socket handshake. The route is direct-local only and sits behind the app-wide dashboard credential + CSRF middleware. An owner change and a workspace switch are both refused before teardown, so the working connection stays up. No credential value reaches logs, the access log or responses. Targeted tests pass and all three guards were mutation-verified. Decisive lines: src/kiro_crew/dashboard/messaging_api/slack_settings.py:473, src/kiro_crew/slack/reconnect.py:414, src/kiro_crew/slack/reconnect.py:426, src/kiro_crew/slack/reconnect.py:528, src/kiro_crew/dashboard/routes/messaging.py:25

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 10, 2026
@bolichen97
bolichen97 merged commit 38b4dd9 into main Nov 10, 2026
99 checks passed
@bolichen97
bolichen97 deleted the fix/10306-slack-reconnect branch November 10, 2026 13:33
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack: add a Reconnect action so saved credentials take effect without restarting the gateway

2 participants