Skip to content

feat: migrate Slack management pages to React#231

Merged
onutc merged 26 commits intomainfrom
codex/react-management-ui-plan
Apr 25, 2026
Merged

feat: migrate Slack management pages to React#231
onutc merged 26 commits intomainfrom
codex/react-management-ui-plan

Conversation

@onutc
Copy link
Copy Markdown
Member

@onutc onutc commented Apr 25, 2026

Summary

Slack management pages should live in the Spritz React app instead of being rendered as Go HTML templates.
This change keeps the existing gateway URLs working by redirecting them into React and adds JSON endpoints for the settings UI to call.
It also adds a small settings button to chat, while leaving the chat UI itself mostly unchanged.

What Changed

The user-facing management surfaces now share one React settings shell.
The Slack gateway still owns OAuth callbacks and backend proxying, but the browser UI is handled by Spritz UI.

  • Added React settings routes for Slack workspaces, workspace target selection, workspace testing, channel routing, install target selection, and install results.
  • Added gateway JSON APIs under /api/slack/... and /api/settings/channels... for those React pages.
  • Redirected old server-rendered Slack management routes into the new React routes.
  • Added a settings icon button to the existing chat header.
  • Added gateway tests for the React redirects and channel-settings JSON update path.

Testing

The gateway tests, UI typecheck, UI test suite, and production build pass locally.
I also previewed the built React app and checked the workspace, channel routing, and install result pages in the browser.

  • cd integrations/slack-gateway && go test ./...
  • cd ui && pnpm typecheck
  • cd ui && pnpm test -- --run
  • cd ui && pnpm build

Risks

The main risk is routing mismatch between the gateway mount path and the React app path.
The old gateway pages now redirect instead of rendering directly, so staging verification should check those redirects behind the real ingress.

  • The gateway keeps the old POST form handler for channel settings as a compatibility path.
  • The React UI treats Platform as the source of truth for storage, authorization, and managed installations.

@onutc onutc changed the title docs: plan React migration for management UI feat: migrate Slack management pages to React Apr 25, 2026
@onutc
Copy link
Copy Markdown
Member Author

onutc commented Apr 25, 2026

Final report for this implementation loop:

Summary:

  • Migrated Slack management/install/channel settings surfaces into the Spritz React settings UI.
  • Kept gateway-owned protocol routes and added JSON APIs plus same-origin React redirects with cross-origin gateway fallbacks.
  • Added the chat settings entrypoint with minimal chat UI change.
  • Documented the React UI ownership rule and opaque backend-assigned installation/connection/route ID contract.
  • Added read-only React visibility for legacy installationConfig-only channel policies so existing overrides are not hidden during migration.

Validation run locally:

  • cd integrations/slack-gateway && go test ./...: passed.
  • cd ui && pnpm typecheck: passed.
  • cd ui && pnpm test -- --run src/pages/settings.test.tsx: passed, 14 tests.
  • cd ui && pnpm test -- --run: passed, 30 files / 228 tests.
  • cd ui && pnpm build: passed with the existing Vite chunk-size warning.
  • git diff --check: passed.
  • Visual verification: settings routes checked in browser at desktop and mobile viewport metrics; no horizontal overflow found.

Review/CI:

  • codex review --base main: clean on latest head 0d29bf9.
  • GitHub checks: docs-check, ui-tests, go-tests, and docker builds are green on latest head.

@onutc onutc merged commit c7efd03 into main Apr 25, 2026
9 checks passed
@onutc onutc deleted the codex/react-management-ui-plan branch April 25, 2026 12:16
@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 management pages from Go HTML templates in the gateway to a React app, establishing a new architectural pattern where integration services expose JSON APIs and redirects while the React UI handles user-facing management. The change adds 4,606 lines across 28 files, including new React routes, gateway JSON endpoints, comprehensive tests, and documentation of the migration plan and ID ownership model.

Analysis Details

Component Classification: This PR spans multiple systems (gateway, UI, documentation) without fitting neatly into a single categorized component. It's a cross-cutting architectural migration rather than a fix to a specific component.

Severity Justification: This is a medium-severity change because it refactors user-facing management surfaces and introduces new routing/redirect logic that could break existing workflows if misconfigured, but it maintains backward compatibility through redirects and doesn't introduce security vulnerabilities or data loss risks.

Eligibility Notes: Tests are required and included: the PR adds 1036 lines to gateway_test.go plus new UI tests (settings.test.tsx with 679 lines, slack-management.test.ts with 42 lines, app.test.tsx expanded). This is a feature/refactoring that changes routing behavior, API contracts, and UI surfaces. The PR is well-documented with a detailed migration plan document and clear description. No specific issue is referenced, but the PR implements a deliberate architectural decision documented in AGENTS.md.


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