Skip to content

fix: route Slack settings through React#233

Merged
onutc merged 1 commit intomainfrom
codex/react-settings-button-route
Apr 25, 2026
Merged

fix: route Slack settings through React#233
onutc merged 1 commit intomainfrom
codex/react-settings-button-route

Conversation

@onutc
Copy link
Copy Markdown
Member

@onutc onutc commented Apr 25, 2026

Summary

The chat settings button still pointed at the old Slack gateway management page.
This change sends users to the React Slack settings UI and removes the old server-rendered Slack management pages.
Old GET URLs still redirect into React, and old form POSTs now return 410 with the JSON API path to use.

What Changed

Slack management UI now has one owner: the React app.
The gateway keeps protocol endpoints and compatibility redirects, but it no longer renders workspace, channel, install picker, install result, or workspace test pages.

  • Changed the chat settings button to link to /settings/slack/workspaces.
  • Removed gateway HTML templates and page rendering helpers for Slack management pages.
  • Kept old GET routes as redirects to the matching React routes.
  • Moved mutation coverage to JSON APIs and made old form POSTs return 410 Gone.
  • Added cross-origin install picker support by passing encrypted pending install state through the React route when cookies cannot cross origins.

Testing

I tested the gateway behavior and the React settings paths touched here.
The UI also builds successfully.

  • cd integrations/slack-gateway && go test ./...
  • cd ui && pnpm typecheck
  • cd ui && pnpm test -- --run src/pages/chat.test.tsx src/pages/settings.test.tsx
  • cd ui && pnpm build
  • git diff --check

Risks

The main behavior change is intentional: old server-rendered form POSTs no longer perform mutations.
React uses the JSON APIs for those mutations, and old page GET links still redirect users to React.

  • Existing bookmarks to old GET pages should still work.
  • Any direct automation posting old HTML form payloads must move to the JSON API routes.

@onutc onutc merged commit 37af16f into main Apr 25, 2026
8 checks passed
@onutc onutc deleted the codex/react-settings-button-route branch April 25, 2026 16:50
@gitrank-connector
Copy link
Copy Markdown

👍 GitRank PR Analysis

Score: 20 points

Metric Value
Component Other (1× multiplier)
Severity P2 - Medium (20 base pts)
Final Score 20 × 1 = 20

Eligibility Checks

Check Status
Issue/Bug Fix
Fix Implementation
PR Documented
Tests
Lines Within Limit

Impact Summary

This PR migrates Slack settings management from server-rendered gateway pages to React-based UI, removing 2,208 lines of legacy template code and HTML rendering logic. The change routes users through React for all management operations while maintaining backward compatibility via redirects for GET requests and 410 responses for legacy form POSTs. Old JSON APIs are now the primary mutation path, requiring any external automation to migrate to new endpoints.

Analysis Details

Component Classification: This PR affects multiple components (Slack gateway backend, React UI, routing, OAuth flows) without a single dominant area, making it an architectural refactoring that spans the system. No specific component multiplier applies, so OTHER (1x) is appropriate.

Severity Justification: This is a P2 (Medium) severity change: it's a functional refactoring that consolidates UI ownership from server-rendered pages to React, with intentional behavior changes (legacy form POSTs now return 410 Gone). While not a critical bug, it has moderate impact on user workflows and requires migration of any automation using old endpoints.

Eligibility Notes: Issue: True - PR fixes the routing issue where chat settings button pointed to old gateway pages. Fix Implementation: True - code changes align with PR title and description, removing legacy pages and routing through React. PR Linked: True - comprehensive description with summary, testing, and risk analysis. Tests: True - PR includes test modifications (gateway_test.go, chat.test.tsx, settings.test.tsx) with 16 test cases updated/added. Tests Required: True - this is a significant API/routing change affecting business logic and user workflows, requiring comprehensive test coverage to ensure backward compatibility and new behavior.


Analyzed by GitRank 🤖

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.

2 participants