Consolidate integrations into workspace Settings and expose Twitch/YouTube OAuth there #95

Closed
opened 2026-07-03 01:38:42 -05:00 by Gitchegumi · 0 comments
Gitchegumi commented 2026-07-03 01:38:42 -05:00 (Migrated from github.com)

Problem

The app currently has multiple competing integrations surfaces:

  • /dashboard/[channelSlug]/integrations is linked from the main dashboard navigation and shows manual credential fields.
  • /dashboard/settings/integrations contains the Twitch/YouTube OAuth account-linking cards.
  • /dashboard/[channelSlug]/settings does not contain integrations.
  • In the deployed UI, the Settings experience still makes integrations feel separate from settings, and the extra integration entry can appear beneath the Danger Zone.

This is the wrong information architecture. Integrations are workspace settings. They should not be a separate top-level nav item, and they should not appear below destructive actions.

Issues #90 and #91 moved in the right direction but left enough ambiguity that the split architecture remained. This issue should supersede that approach and consolidate integrations into one workspace Settings experience.

Required behavior

Integrations must live directly inside /dashboard/[channelSlug]/settings.

The Settings page should contain clear sections in this order:

  1. Workspace details
  2. Integrations
  3. Danger Zone

Danger Zone must always be last.

Current code paths to reconcile

  • Top-level nav currently includes Integrations pointing at /dashboard/[channelSlug]/integrations.
  • /dashboard/[channelSlug]/integrations renders the manual IntegrationSettingsForm.
  • /dashboard/settings/integrations renders the OAuth IntegrationCard UI for Twitch and YouTube.
  • /dashboard/[channelSlug]/settings currently only renders workspace name and Danger Zone.

These should not remain as separate user-facing concepts.

Acceptance criteria

  • Remove Integrations from the top-level dashboard nav.
  • Remove or redirect /dashboard/[channelSlug]/integrations.
  • Remove or redirect /dashboard/settings/integrations.
  • Add an Integrations section directly to /dashboard/[channelSlug]/settings.
  • The Settings page renders sections in this order:
    1. Workspace details
    2. Integrations
    3. Danger Zone
  • No non-danger navigation or integration controls appear below Danger Zone.
  • The Integrations section shows Ko-fi, Twitch, and YouTube setup in one place.
  • Twitch and YouTube show OAuth connect/reconnect/disconnect controls inside Settings.
  • Users must not have to manually navigate to a separate integrations page to connect Twitch or YouTube.
  • The OAuth controls must use the existing account-linking flow, but it must be reachable from the selected workspace Settings page.
  • Ko-fi can remain manual token/webhook setup for now.
  • Existing manual credential support should either be merged into the Settings integrations section or intentionally replaced by OAuth where OAuth is available.
  • Ensure the linked Twitch/YouTube account is associated with, selectable for, or otherwise usable by the current workspace/channel.

OAuth/environment cleanup

The current documentation/configuration appears contradictory:

  • .env.example says platform credentials are configured per workspace from Dashboard -> Settings -> Integrations.
  • auth.ts only enables Twitch/Google OAuth providers when instance-level env vars exist:
    • TWITCH_CLIENT_ID
    • TWITCH_CLIENT_SECRET
    • GOOGLE_CLIENT_ID
    • GOOGLE_CLIENT_SECRET

Fix the docs and example env so operators know what is actually required.

Acceptance criteria for this part:

  • If OAuth requires instance-level provider credentials, document those variables clearly in .env.example and README.
  • Do not claim Twitch/YouTube OAuth credentials are only per-workspace if NextAuth requires global provider credentials.
  • If per-workspace OAuth provider credentials are intended instead, refactor the provider initialization so that actually works.
  • The deployed UI should make it obvious when OAuth is unavailable because provider env vars are missing, instead of silently hiding or breaking the connect flow.

Tests

Add or update tests that confirm:

  • /dashboard/[channelSlug]/settings renders the Integrations section above Danger Zone.
  • The top-level dashboard nav no longer includes Integrations.
  • Twitch and YouTube OAuth connect buttons are visible from /dashboard/[channelSlug]/settings when OAuth providers are configured.
  • Missing OAuth provider configuration produces a clear disabled state or warning.
  • Old integrations routes redirect to /dashboard/[channelSlug]/settings#integrations or are removed intentionally.

Notes

Do not solve this by adding another button or another route. The goal is one coherent Settings experience where integrations are first-class settings, not a disconnected page and not something visually buried near destructive actions.

## Problem The app currently has multiple competing integrations surfaces: - `/dashboard/[channelSlug]/integrations` is linked from the main dashboard navigation and shows manual credential fields. - `/dashboard/settings/integrations` contains the Twitch/YouTube OAuth account-linking cards. - `/dashboard/[channelSlug]/settings` does not contain integrations. - In the deployed UI, the Settings experience still makes integrations feel separate from settings, and the extra integration entry can appear beneath the Danger Zone. This is the wrong information architecture. Integrations are workspace settings. They should not be a separate top-level nav item, and they should not appear below destructive actions. Issues #90 and #91 moved in the right direction but left enough ambiguity that the split architecture remained. This issue should supersede that approach and consolidate integrations into one workspace Settings experience. ## Required behavior Integrations must live directly inside `/dashboard/[channelSlug]/settings`. The Settings page should contain clear sections in this order: 1. Workspace details 2. Integrations 3. Danger Zone Danger Zone must always be last. ## Current code paths to reconcile - Top-level nav currently includes `Integrations` pointing at `/dashboard/[channelSlug]/integrations`. - `/dashboard/[channelSlug]/integrations` renders the manual `IntegrationSettingsForm`. - `/dashboard/settings/integrations` renders the OAuth `IntegrationCard` UI for Twitch and YouTube. - `/dashboard/[channelSlug]/settings` currently only renders workspace name and Danger Zone. These should not remain as separate user-facing concepts. ## Acceptance criteria - Remove `Integrations` from the top-level dashboard nav. - Remove or redirect `/dashboard/[channelSlug]/integrations`. - Remove or redirect `/dashboard/settings/integrations`. - Add an `Integrations` section directly to `/dashboard/[channelSlug]/settings`. - The Settings page renders sections in this order: 1. Workspace details 2. Integrations 3. Danger Zone - No non-danger navigation or integration controls appear below Danger Zone. - The Integrations section shows Ko-fi, Twitch, and YouTube setup in one place. - Twitch and YouTube show OAuth connect/reconnect/disconnect controls inside Settings. - Users must not have to manually navigate to a separate integrations page to connect Twitch or YouTube. - The OAuth controls must use the existing account-linking flow, but it must be reachable from the selected workspace Settings page. - Ko-fi can remain manual token/webhook setup for now. - Existing manual credential support should either be merged into the Settings integrations section or intentionally replaced by OAuth where OAuth is available. - Ensure the linked Twitch/YouTube account is associated with, selectable for, or otherwise usable by the current workspace/channel. ## OAuth/environment cleanup The current documentation/configuration appears contradictory: - `.env.example` says platform credentials are configured per workspace from Dashboard -> Settings -> Integrations. - `auth.ts` only enables Twitch/Google OAuth providers when instance-level env vars exist: - `TWITCH_CLIENT_ID` - `TWITCH_CLIENT_SECRET` - `GOOGLE_CLIENT_ID` - `GOOGLE_CLIENT_SECRET` Fix the docs and example env so operators know what is actually required. Acceptance criteria for this part: - If OAuth requires instance-level provider credentials, document those variables clearly in `.env.example` and README. - Do not claim Twitch/YouTube OAuth credentials are only per-workspace if NextAuth requires global provider credentials. - If per-workspace OAuth provider credentials are intended instead, refactor the provider initialization so that actually works. - The deployed UI should make it obvious when OAuth is unavailable because provider env vars are missing, instead of silently hiding or breaking the connect flow. ## Tests Add or update tests that confirm: - `/dashboard/[channelSlug]/settings` renders the Integrations section above Danger Zone. - The top-level dashboard nav no longer includes `Integrations`. - Twitch and YouTube OAuth connect buttons are visible from `/dashboard/[channelSlug]/settings` when OAuth providers are configured. - Missing OAuth provider configuration produces a clear disabled state or warning. - Old integrations routes redirect to `/dashboard/[channelSlug]/settings#integrations` or are removed intentionally. ## Notes Do not solve this by adding another button or another route. The goal is one coherent Settings experience where integrations are first-class settings, not a disconnected page and not something visually buried near destructive actions.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gitchegumi/GitchAlerts#95
No description provided.