code<spar>

Dashboard Settings

Configure channels, team members, autonomy policies, and general project settings from the dashboard Settings page.

Dashboard Settings

The Settings page at /dashboard/settings is organized into four tabs: Channels, Team, Policies, and General. Each tab manages a different aspect of your CodeSpar deployment.

Channels Tab

The Channels tab displays the status of all configured messaging channels and provides controls for managing connections.

Channel Cards

Each channel is displayed as a card with the following information:

┌────────────────────────────────────┐
│ Slack                   Connected  │
│ Bot: @codespar                     │
│ Workspace: Acme Corp               │
│ Connected: 14 days ago             │
│                                    │
│ [Reconnect]  [Disconnect]         │
└────────────────────────────────────┘
FieldDescription
Channel nameSlack, WhatsApp, Discord, or Telegram
StatusConnected (green), Disconnected (red), or Connecting (amber)
Bot nameThe bot's display name in the channel
Workspace/GroupThe connected workspace, group, or server name
Connected sinceHow long the channel has been active

Actions

ButtonDescription
ReconnectRe-establishes the channel connection. Useful when a token has been rotated or the connection was interrupted.
DisconnectRemoves the channel configuration. Agents will no longer send or receive messages on this channel.

Channel Status Indicators

StatusColorMeaning
ConnectedAgent Green (#10B981)Channel is active and receiving messages
DisconnectedCritical Red (#EF4444)Channel is configured but not connected
ConnectingAlert Amber (#F59E0B)Connection is being established
Not ConfiguredSlate (#6B7280)Channel has not been set up yet

Channels that are not yet configured display a "Configure" button that links to the Setup page.

Team Tab

The Team tab manages team members and their roles using Clerk's organization membership system.

Member List

Each team member is displayed with:

FieldDescription
AvatarProfile picture from Clerk
NameFull name
EmailEmail address
RoleOrganization role (Owner, Admin, Member)
JoinedWhen they joined the organization

Roles (RBAC)

CodeSpar uses role-based access control through Clerk Organizations:

RolePermissions
OwnerFull access. Can delete the organization, manage billing, and change any setting.
AdminCan manage agents, approve deploys, change policies, and invite members. Cannot delete the organization.
MemberCan view dashboards, trigger tasks, and approve actions (if allowed by policy). Cannot change settings.

Inviting Members

To invite a new team member:

  1. Click the "Invite Member" button
  2. Enter their email address
  3. Select a role (Admin or Member)
  4. Click "Send Invite"

The invitation is sent via Clerk's built-in email system. The invited user receives an email with a link to join the organization.

import { useOrganization } from "@clerk/nextjs";
 
function InviteForm() {
  const { organization } = useOrganization();
 
  async function handleInvite(email: string, role: string) {
    await organization.inviteMember({
      emailAddress: email,
      role,
    });
  }
}

Managing Roles

Organization Owners and Admins can change a member's role by clicking the role dropdown next to their name. Role changes take effect immediately.

Policies Tab

The Policies tab configures autonomy levels, risk thresholds, and approval requirements.

Autonomy Level Per Agent

A table lists each agent with its current autonomy level and a control to change it:

AgentCurrent LevelControl
Project AgentL2 (Suggest)Dropdown: L0-L5
Review AgentL3 (Auto-Low)Dropdown: L0-L5
Deploy AgentL1 (Notify)Dropdown: L0-L5

Changing the autonomy level sends a set_autonomy action to the backend and logs the change in the audit trail.

Risk Thresholds

Configure what risk levels require approval:

SettingDescriptionDefault
Auto-approve Low riskSkip approval for low-risk actionsOn (at L3+)
Auto-approve Medium riskSkip approval for medium-risk actionsOff
Always require approval for HighRequire approval even at L5On
Always require approval for CriticalRequire approval even at L5On (cannot be disabled)

Approval Quorum

Configure how many approvals are needed before an action executes:

EnvironmentQuorumDescription
Staging1One team member approval required
Production2Two team member approvals required

The quorum values can be adjusted using number inputs. The minimum quorum for production is 1 (cannot be set to 0).

Self-Approval Blocking

A toggle that controls whether the person who requested an action can also approve it:

  • On (default): The requester cannot approve their own request
  • Off: Any team member can approve, including the requester

This is a security feature to enforce separation of duties.

General Tab

The General tab contains project-level settings and notification preferences.

Project Settings

SettingDescriptionExample
Project nameDisplay name for the project in the dashboard"CodeSpar Core"
Webhook URLThe URL where GitHub sends webhook eventshttps://api.codespar.dev/webhooks/github

The project name is editable inline. The webhook URL is read-only but includes a "Copy" button.

Notification Preferences

Toggle switches for email and in-app notifications:

NotificationDescriptionDefault
Build failuresEmail when a CI build failsOn
Deploy requestsEmail when a deploy needs approvalOn
Agent errorsEmail when an agent enters error stateOn
Daily digestDaily summary email of all activityOff
Weekly reportWeekly activity and metrics reportOff

Danger Zone

At the bottom of the General tab, a "Danger Zone" section with destructive actions:

ActionDescriptionConfirmation
Unlink RepositoryRemoves the GitHub repository link and deletes the webhookDouble confirmation required
Reset AgentsRestarts all agents and clears their in-memory stateDouble confirmation required

Both actions require typing the project name to confirm.

API Endpoints

The Settings page interacts with these endpoints:

EndpointMethodDescription
GET /api/channelsGETList channel configurations and status
POST /api/channels/:id/reconnectPOSTReconnect a channel
DELETE /api/channels/:idDELETEDisconnect a channel
GET /api/agentsGETList agents with autonomy levels
POST /api/agents/:id/actionPOSTUpdate autonomy level
GET /api/projectGETGet project settings
PATCH /api/projectPATCHUpdate project settings

Next Steps