mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:01:08 +02:00
Six unrelated type-error pockets that were each blocking a different
page from compiling clean. Grouped because none individually warrants
its own commit and they all touch the same module's call sites.
api-keys/+page.svelte
- Removed the `key: undefined as unknown as string` workaround for
stripping the secret from the local list. Replaced with a clean
object-rest destructure that produces a row matching the ApiKey
shape (no `key` field). The cast was the source of two type
errors AND was lying about the runtime shape.
- Badge `variant="secondary"` and `variant="outline"` aren't valid
BadgeVariant — narrowed to `default` and `info` respectively.
- Button `variant="destructive"` and Badge `variant="destructive"`
don't exist in the shared-ui union — both → `danger`.
- Rate-limit input bound a `number` to a `<Input>` component whose
`value` is typed `string`. Switched to a string state and
parseInt on submit. Prevents the binding cast that the type
checker (correctly) rejected.
reset-password/+page.svelte
- Calling `authStore.resetPassword(token, password)` with two args
on a method that takes one (sends the reset email). The method
that actually performs the reset is `resetPasswordWithToken`.
Two args, no API contract change needed.
- `<Input minlength={12}>` — minlength isn't a prop on the shared
Input component (it's not a passthrough wrapper). Removed; the
runtime check still gates submit.
dashboard/widgets/{Credits,Transactions}Widget.svelte
- `let state = $state<...>(...)` — variable named `state` shadows
the `$state` rune call, which TypeScript flags as
"Block-scoped variable '$state' used before its declaration"
+ "Untyped function calls may not accept type arguments".
Renamed both to `loadState`.
dashboard/widgets/TasksTodayWidget.svelte
- Referenced `task.dueTime`, which doesn't exist on LocalTask
(only `dueDate`, ISO timestamp). Dropped the dead branch — the
time was already encoded in `dueDate` and the widget never
surfaced anything actionable from it anyway.
skilltree/components/StatsOverview.svelte
- Was manually wiring `.subscribe()` callbacks because the old
queries.ts returned raw Dexie Observables. After the
Observable→useLiveQueryWithDefault migration, those return
`{value, loading, error}` instead — `subscribe` doesn't exist
on them. Replaced the manual state plumbing with direct
`.value` reads inside `$derived`. Net: less code, fewer
levels of indirection.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| guides | ||
| inventory | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| nutriphi | ||
| photos | ||
| picture | ||
| planta | ||
| presi | ||
| questions | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||
| zitare/packages/content | ||