feat(router-phase18): Mount + UI-Routen für api-keys, comments [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 07:37:22 +02:00
parent f299a57da9
commit ac922348ba
4 changed files with 62 additions and 40 deletions

View File

@ -1,11 +1,12 @@
{ {
"completed_features": [], "completed_features": [],
"current_feature": "api-client-phase18", "current_feature": "router-phase18",
"started_at": "2026-05-23T07:29:44.977564", "started_at": "2026-05-23T07:29:44.977564",
"attempted_features": [ "attempted_features": [
"api-key-management", "api-key-management",
"audit-log-filters", "audit-log-filters",
"idle-detection", "idle-detection",
"time-entry-comments" "time-entry-comments",
"api-client-phase18"
] ]
} }

View File

@ -2226,3 +2226,22 @@ src/index.ts(27,25): error TS2769: No overload matches this call.
Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
- `07:36:10` **INFO** Committed feature api-client-phase18
- `07:36:10` **INFO** Pushed: rc=0
## Phase-3 Feature: router-phase18 (2026-05-23 07:36:10)
- `07:36:10` **INFO** Description: Mount + UI-Routen für api-keys, comments
- `07:36:10` **INFO** Generating apps/api/src/routes/index.ts (ERWEITERT — füge apiKeyRoutes ('/api/api-keys') + timeEntryCommentRout…)
- `07:36:26` **INFO** wrote 2063 chars in 16.3s (attempt 1)
- `07:36:26` **INFO** Generating apps/web/src/App.tsx (ERWEITERT — füge /api-keys Route. Behalte alles.…)
- `07:37:20` **INFO** wrote 6554 chars in 54.1s (attempt 1)
- `07:37:20` **INFO** Running tsc --noEmit on api…
- `07:37:22` **WARN** tsc errors:
src/index.ts(27,25): error TS2769: No overload matches this call.
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }, done: (err?: Error | undefined) => void): void'.
Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy

View File

@ -5,6 +5,7 @@ import projectRoutes from "./projects"
import projectTemplateRoutes from "./project-templates" import projectTemplateRoutes from "./project-templates"
import timeEntryRoutes from "./time-entries" import timeEntryRoutes from "./time-entries"
import timeEntryTemplateRoutes from "./time-entry-templates" import timeEntryTemplateRoutes from "./time-entry-templates"
import timeEntryCommentRoutes from "./time-entry-comments"
import userRoutes from "./users" import userRoutes from "./users"
import settingsRoutes from "./settings" import settingsRoutes from "./settings"
import auditLogRoutes from "./audit-log" import auditLogRoutes from "./audit-log"
@ -15,10 +16,12 @@ import reportsRoutes from "./reports"
import invoiceRoutes from "./invoices" import invoiceRoutes from "./invoices"
import savedViewRoutes from "./saved-views" import savedViewRoutes from "./saved-views"
import notificationRoutes from "./notifications" import notificationRoutes from "./notifications"
import apiKeyRoutes from "./api-keys"
export async function setupRoutes(server: FastifyInstance) { export async function setupRoutes(server: FastifyInstance) {
server.register(authRoutes, { prefix: "/api/auth" }) server.register(authRoutes, { prefix: "/api/auth" })
server.register(timeEntryRoutes, { prefix: "/api/time-entries" }) server.register(timeEntryRoutes, { prefix: "/api/time-entries" })
server.register(timeEntryCommentRoutes, { prefix: "/api/time-entry-comments" })
server.register(timeEntryTemplateRoutes, { prefix: "/api/time-entry-templates" }) server.register(timeEntryTemplateRoutes, { prefix: "/api/time-entry-templates" })
server.register(customerRoutes, { prefix: "/api/customers" }) server.register(customerRoutes, { prefix: "/api/customers" })
server.register(projectRoutes, { prefix: "/api/projects" }) server.register(projectRoutes, { prefix: "/api/projects" })
@ -33,4 +36,5 @@ export async function setupRoutes(server: FastifyInstance) {
server.register(invoiceRoutes, { prefix: "/api/invoices" }) server.register(invoiceRoutes, { prefix: "/api/invoices" })
server.register(savedViewRoutes, { prefix: "/api/saved-views" }) server.register(savedViewRoutes, { prefix: "/api/saved-views" })
server.register(notificationRoutes, { prefix: "/api/notifications" }) server.register(notificationRoutes, { prefix: "/api/notifications" })
server.register(apiKeyRoutes, { prefix: "/api/api-keys" })
} }

View File

@ -20,6 +20,7 @@ import Billing from "./pages/Billing"
import Integrations from "./pages/Integrations" import Integrations from "./pages/Integrations"
import ProjectTemplates from "./pages/ProjectTemplates" import ProjectTemplates from "./pages/ProjectTemplates"
import Invoices from "./pages/Invoices" import Invoices from "./pages/Invoices"
import ApiKeys from "./pages/ApiKeys"
import Nav from "./components/Nav" import Nav from "./components/Nav"
import CommandPalette from "./components/CommandPalette" import CommandPalette from "./components/CommandPalette"
import KeyboardHelp from "./components/KeyboardHelp" import KeyboardHelp from "./components/KeyboardHelp"
@ -145,13 +146,6 @@ const projectDetailRoute = createRoute({
component: ProjectDetail component: ProjectDetail
}) })
const documentsRoute = createRoute({
getParentRoute: () => rootRoute,
path: "/documents",
beforeLoad: authCheck,
component: Documents
})
const profileRoute = createRoute({ const profileRoute = createRoute({
getParentRoute: () => rootRoute, getParentRoute: () => rootRoute,
path: "/profile", path: "/profile",
@ -159,6 +153,13 @@ const profileRoute = createRoute({
component: Profile component: Profile
}) })
const adminUsersRoute = createRoute({
getParentRoute: () => rootRoute,
path: "/admin/users",
beforeLoad: adminCheck,
component: AdminUsers
})
const settingsRoute = createRoute({ const settingsRoute = createRoute({
getParentRoute: () => rootRoute, getParentRoute: () => rootRoute,
path: "/settings", path: "/settings",
@ -166,33 +167,24 @@ const settingsRoute = createRoute({
component: Settings component: Settings
}) })
const adminUsersRoute = createRoute({
getParentRoute: () => rootRoute,
path: "/admin/users",
beforeLoad: async () => {
await authCheck()
await adminCheck()
},
component: AdminUsers
})
const auditLogRoute = createRoute({ const auditLogRoute = createRoute({
getParentRoute: () => rootRoute, getParentRoute: () => rootRoute,
path: "/admin/audit-log", path: "/audit-log",
beforeLoad: async () => { beforeLoad: adminCheck,
await authCheck()
await adminCheck()
},
component: AuditLog component: AuditLog
}) })
const documentsRoute = createRoute({
getParentRoute: () => rootRoute,
path: "/documents",
beforeLoad: authCheck,
component: Documents
})
const webhooksRoute = createRoute({ const webhooksRoute = createRoute({
getParentRoute: () => rootRoute, getParentRoute: () => rootRoute,
path: "/admin/webhooks", path: "/webhooks",
beforeLoad: async () => { beforeLoad: authCheck,
await authCheck()
await adminCheck()
},
component: Webhooks component: Webhooks
}) })
@ -219,11 +211,8 @@ const integrationsRoute = createRoute({
const projectTemplatesRoute = createRoute({ const projectTemplatesRoute = createRoute({
getParentRoute: () => rootRoute, getParentRoute: () => rootRoute,
path: "/admin/project-templates", path: "/projects/templates",
beforeLoad: async () => { beforeLoad: authCheck,
await authCheck()
await adminCheck()
},
component: ProjectTemplates component: ProjectTemplates
}) })
@ -234,6 +223,13 @@ const invoicesRoute = createRoute({
component: Invoices component: Invoices
}) })
const apiKeysRoute = createRoute({
getParentRoute: () => rootRoute,
path: "/api-keys",
beforeLoad: authCheck,
component: ApiKeys
})
const routeTree = [ const routeTree = [
indexRoute, indexRoute,
loginRoute, loginRoute,
@ -245,17 +241,18 @@ const routeTree = [
customerDetailRoute, customerDetailRoute,
projectsRoute, projectsRoute,
projectDetailRoute, projectDetailRoute,
documentsRoute,
profileRoute, profileRoute,
settingsRoute,
adminUsersRoute, adminUsersRoute,
settingsRoute,
auditLogRoute, auditLogRoute,
documentsRoute,
webhooksRoute, webhooksRoute,
twoFactorRoute, twoFactorRoute,
billingRoute, billingRoute,
integrationsRoute, integrationsRoute,
projectTemplatesRoute, projectTemplatesRoute,
invoicesRoute invoicesRoute,
apiKeysRoute
] ]
const router = createRouter({ const router = createRouter({
@ -271,8 +268,9 @@ declare module "@tanstack/react-router" {
export default function App() { export default function App() {
return ( return (
<ErrorBoundary> <RouterProvider
<RouterProvider router={router} /> router={router}
</ErrorBoundary> fallback={<div>Loading...</div>}
/>
) )
} }