Skip to content

chore/admin dashboard template#53

Merged
CarmenDou merged 16 commits into
mainfrom
feat/admin-dashboard-template
Jun 4, 2026
Merged

chore/admin dashboard template#53
CarmenDou merged 16 commits into
mainfrom
feat/admin-dashboard-template

Conversation

@CarmenDou

@CarmenDou CarmenDou commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Switches the Apps page to real Composio OAuth for seven integrations and adds a “Send to Slack” action from Tasks. The catalog is Composio‑only, the Apps tab returns to the sidebar, and the sign‑in screen shows Google/GitHub icons; the template registry now highlights Composio integrations and outbound actions.

  • New Features

    • Connect GitHub, Slack, Notion, Discord, Figma, Linear, Vercel via Composio; shows “Connected as …” and Disconnect.
    • Apps page detects provisioned toolkits; non‑provisioned show “Coming soon” with a setup banner and retry.
    • Edge functions: apps-config, apps-connect, apps-poll, apps-disconnect, apps-slack-list-channels, apps-slack-send-task.
    • Tasks: “Send to Slack” with channel picker; uses the Composio Slack connection.
    • Sign‑in: Google/GitHub SVG icons. Registry features updated to emphasize Composio integrations and outbound actions.
  • Migration

    • Apply the new DB migration (adds composio_toolkit_slug, reseeds catalog to Composio only; removes Stripe/OpenRouter/Zapier) or re-run db_init.sql.
    • Provision Composio and set COMPOSIO_API_KEY and COMPOSIO_AUTH_CONFIG_* secrets, then deploy the six edge functions; see README “Connecting third‑party apps”.

Written for commit d8f4c7b. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

10 issues found across 25 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="admin-dashboard/functions/apps-disconnect.ts">

<violation number="1" location="admin-dashboard/functions/apps-disconnect.ts:61">
P2: Silent error suppression on Composio cleanup. `.catch(() => {})` discards all fetch errors without logging, making orphaned Composio connections invisible to operators.</violation>
</file>

<file name="admin-dashboard/migrations/20260526150000_composio-apps-integration.sql">

<violation number="1" location="admin-dashboard/migrations/20260526150000_composio-apps-integration.sql:27">
P1: Hard delete of Zapier row silently cascade-deletes existing app_connections referencing it (FK has `on delete cascade`). Active user connections are destroyed without warning, rollback ability, or migration-time check.</violation>
</file>

<file name="admin-dashboard/functions/apps-poll.ts">

<violation number="1" location="admin-dashboard/functions/apps-poll.ts:88">
P2: `apps-poll` upserts `app_connections` using unvalidated `app_slug`, allowing mismatched/invalid app connection records to be written.</violation>
</file>

<file name="admin-dashboard/functions/apps-slack-list-channels.ts">

<violation number="1" location="admin-dashboard/functions/apps-slack-list-channels.ts:70">
P2: Channel listing is capped at 200 with no pagination, so many valid Slack channels become undiscoverable in larger workspaces.</violation>
</file>

<file name="admin-dashboard/functions/apps-slack-send-task.ts">

<violation number="1" location="admin-dashboard/functions/apps-slack-send-task.ts:89">
P2: `err(409, ...)` used when no connection row exists — 409 means conflict (wrong state), but a missing row is a 404 Not Found.</violation>

<violation number="2" location="admin-dashboard/functions/apps-slack-send-task.ts:109">
P2: User-provided task text is sent with Slack markdown parsing enabled, allowing mention/formatting injection in outbound messages.</violation>
</file>

<file name="admin-dashboard/src/features/apps/apps-page.tsx">

<violation number="1" location="admin-dashboard/src/features/apps/apps-page.tsx:25">
P2: Transient `apps-config` failures are treated as "Composio disabled", which can incorrectly disable all third-party app connections.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread admin-dashboard/src/features/apps/use-connect-app.ts
Comment thread admin-dashboard/docs/superpowers/specs/2026-05-26-composio-apps-integration.md Outdated
Comment thread admin-dashboard/migrations/20260526150000_composio-apps-integration.sql Outdated
Comment thread admin-dashboard/functions/apps-disconnect.ts Outdated
Comment thread admin-dashboard/functions/apps-slack-send-task.ts Outdated
Comment thread admin-dashboard/functions/apps-poll.ts
Comment thread admin-dashboard/functions/apps-slack-list-channels.ts Outdated
Comment thread admin-dashboard/src/features/apps/apps-page.tsx
Comment thread admin-dashboard/functions/apps-slack-send-task.ts
Comment thread admin-dashboard/docs/superpowers/specs/2026-05-26-composio-apps-integration.md Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 16 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="admin-dashboard/src/features/apps/apps-grid.tsx">

<violation number="1" location="admin-dashboard/src/features/apps/apps-grid.tsx:87">
P2: Connected native integrations now show a Disconnect button that the backend rejects.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

</CardHeader>

<CardContent className="mt-auto flex items-center justify-between gap-3 pt-0">
{app.connected ? (

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Connected native integrations now show a Disconnect button that the backend rejects.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At admin-dashboard/src/features/apps/apps-grid.tsx, line 87:

<comment>Connected native integrations now show a Disconnect button that the backend rejects.</comment>

<file context>
@@ -85,22 +84,7 @@ export function AppsGrid({
-                  </Button>
-                </>
-              ) : app.connected ? (
+              {app.connected ? (
                 <>
                   <span
</file context>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 7 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="admin-dashboard/functions/apps-slack-send-task.ts">

<violation number="1" location="admin-dashboard/functions/apps-slack-send-task.ts:95">
P2: Database lookup errors are incorrectly returned as `slack_not_connected` (404), masking real backend failures as a missing Slack connection.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

.eq('workspace_id', workspace_id)
.eq('app_slug', 'slack')
.single()
if (connErr || !connRow) return err(404, 'slack_not_connected')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Database lookup errors are incorrectly returned as slack_not_connected (404), masking real backend failures as a missing Slack connection.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At admin-dashboard/functions/apps-slack-send-task.ts, line 95:

<comment>Database lookup errors are incorrectly returned as `slack_not_connected` (404), masking real backend failures as a missing Slack connection.</comment>

<file context>
@@ -86,12 +92,12 @@ export default async function handler(req: Request): Promise<Response> {
     .eq('app_slug', 'slack')
     .single()
-  if (connErr || !connRow) return err(409, 'slack_not_connected')
+  if (connErr || !connRow) return err(404, 'slack_not_connected')
   if (connRow.status !== 'connected') return err(409, 'slack_not_connected')
 
</file context>
Suggested change
if (connErr || !connRow) return err(404, 'slack_not_connected')
if (connErr) return err(500, 'app_connection_lookup_failed', connErr.message)
if (!connRow) return err(404, 'slack_not_connected')

@Fermionic-Lyu Fermionic-Lyu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, Approved.

@CarmenDou CarmenDou merged commit 0436210 into main Jun 4, 2026
4 checks passed
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