Skip to content

Commit d0a3e86

Browse files
Split project settings into sub-pages (raphaeltm#1523)
* feat: split project settings into subpages * chore: archive project settings subpages task --------- Co-authored-by: Raphaël Titsworth-Morin <raphael@raphaeltm.com>
1 parent 50948cc commit d0a3e86

23 files changed

Lines changed: 575 additions & 217 deletions

apps/api/src/routes/project-deployment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ gcpDeployCallbackRoute.get(
528528
const db = drizzle(c.env.DATABASE, { schema });
529529
await requireProjectCapability(db, projectId, sessionUserId, 'infra:manage');
530530

531-
const appUrl = `https://app.${c.env.BASE_DOMAIN}/projects/${projectId}/settings`;
531+
const appUrl = `https://app.${c.env.BASE_DOMAIN}/projects/${projectId}/settings/deploy`;
532532

533533
// Exchange auth code for access token
534534
const redirectUri = `https://api.${c.env.BASE_DOMAIN}/api/deployment/gcp/callback`;

apps/api/src/services/credential-attribution-health.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export async function buildCredentialAttributionForTriggers(input: {
235235
const owner = users.get(trigger.userId) ?? null;
236236
const agentTarget = inferAgentTarget(trigger, project, defaultAgentType);
237237
const computeTarget = inferComputeTarget(trigger, project);
238-
const fixHref = `/projects/${project.id}/settings`;
238+
const fixHref = `/projects/${project.id}/settings/connections`;
239239
const agentCoverage = findCoverage(coverage, 'agent', agentTarget);
240240
const computeCoverage = findCoverage(coverage, 'compute', computeTarget);
241241

apps/api/src/services/project-offboarding-preview-resources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ async function addProjectAttachmentResources(input: {
391391
resourceId: attachment.id,
392392
title: row.configurationName,
393393
subtitle: `${attachment.consumerKind}:${attachment.consumerTarget}`,
394-
href: `/projects/${input.projectId}/settings`,
394+
href: `/projects/${input.projectId}/settings/connections`,
395395
credentialSourceBefore: 'project',
396396
attributionUserIdBefore: attachment.userId,
397397
attributionProjectIdBefore: input.projectId,

apps/api/tests/unit/routes/project-deployment.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ describe('GET /api/deployment/gcp/callback (static URI)', () => {
681681
const location = res.headers.get('Location')!;
682682

683683
// Redirect goes to the project from KV state, not from URL
684-
expect(location).toContain('/projects/proj-from-state/settings');
684+
expect(location).toContain('/projects/proj-from-state/settings/deploy');
685685
expect(location).toContain('gcp_deploy_setup=ready');
686686

687687
// Token exchange uses the static redirect URI

apps/web/src/App.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,17 @@ import { ProjectLibrary } from './pages/ProjectLibrary';
4444
import { ProjectNotifications } from './pages/ProjectNotifications';
4545
import { ProjectProfiles } from './pages/ProjectProfiles';
4646
import { Projects } from './pages/Projects';
47-
import { ProjectSettings } from './pages/ProjectSettings';
47+
import {
48+
ProjectSettings,
49+
ProjectSettingsAccess,
50+
ProjectSettingsAgents,
51+
ProjectSettingsConnections,
52+
ProjectSettingsDeploy,
53+
ProjectSettingsGeneral,
54+
ProjectSettingsIndexRedirect,
55+
ProjectSettingsInfrastructure,
56+
ProjectSettingsRuntime,
57+
} from './pages/ProjectSettings';
4858
import { ProjectSkills } from './pages/ProjectSkills';
4959
import { ProjectTriggerDetail } from './pages/ProjectTriggerDetail';
5060
import { ProjectTriggers } from './pages/ProjectTriggers';
@@ -127,7 +137,16 @@ export default function App() {
127137
<Route path="ideas/:taskId" element={<IdeaDetailPage />} />
128138
<Route path="tasks" element={<Navigate to="../ideas" replace />} />
129139
<Route path="tasks/:taskId" element={<TaskDetail />} />
130-
<Route path="settings" element={<ProjectSettings />} />
140+
<Route path="settings" element={<ProjectSettings />}>
141+
<Route index element={<ProjectSettingsIndexRedirect />} />
142+
<Route path="general" element={<ProjectSettingsGeneral />} />
143+
<Route path="access" element={<ProjectSettingsAccess />} />
144+
<Route path="connections" element={<ProjectSettingsConnections />} />
145+
<Route path="agents" element={<ProjectSettingsAgents />} />
146+
<Route path="infrastructure" element={<ProjectSettingsInfrastructure />} />
147+
<Route path="runtime" element={<ProjectSettingsRuntime />} />
148+
<Route path="deploy" element={<ProjectSettingsDeploy />} />
149+
</Route>
131150
<Route path="activity" element={<ProjectActivity />} />
132151
<Route path="notifications" element={<ProjectNotifications />} />
133152
<Route path="triggers" element={<ProjectTriggers />} />

apps/web/src/components/project-settings/ProjectMembersSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function MemberRow({
135135
{member.user?.email ?? member.userId}
136136
</div>
137137
</div>
138-
<div className="flex flex-wrap items-center gap-1.5 sm:justify-end">
138+
<div className="flex flex-col items-start gap-1.5 sm:flex-row sm:flex-wrap sm:items-center sm:justify-end">
139139
<span className="text-[0.6875rem] px-1.5 py-px rounded-sm bg-inset text-fg-muted">
140140
{member.role}
141141
</span>

0 commit comments

Comments
 (0)