feat(app,admin): migrate consoles from Nuxt 3 EOL to Nuxt 4 - #28
Merged
Conversation
Nuxt 3 is out of support. Move both hosts to Nuxt 4 with i18n v10 and Pinia 0.11, keep the v3-flat slice layout, and add nuxt typecheck to CI. Co-authored-by: Cursor <cursoragent@cursor.com>
…igration # Conflicts: # .specify/feature.json # bun.lock
Post-merge follow-up: the thinking-segment anchor read messages[length-1].ts behind a length guard, which the stricter Nuxt 4 tsconfig still flags as possibly undefined — optional-chain it instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Regex capture groups and indexed array reads are string|undefined under the Nuxt 4 tsconfig. Narrow via optional chaining + locals instead of non-null assertions: the three cookie access_token parsers (agent.gateway, agentFile.gateway, useRanchUpdate, apiBaseUrl), the log timestamp/text groups in agentLogs, and the stream/stream_end upserts in the bridle store. Full sweep over slices/**/*.ts in both consoles is clean (the lone remaining agent.ts API-type error predates the migration and needs an openapi regen, not a code fix). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app/andadmin/from Nuxt 3.21 (EOL) to Nuxt 4.5, with@nuxtjs/i18nv10,@pinia/nuxt0.11, and@nuxt/image2.1. Slice layout stays v3-flat (registerSlices(), noapp/app/).<slice>/i18n/locales/;nuxt typecheckis wired into both hosts, turbo, and CI after swagger generate.noUncheckedIndexedAccessand a few call-site fixes (Iconclass, template types, file viewer props, Badge import).Closes CLEAN-32 (Jira). Spec:
specs/002-nuxt4-migration/.Test plan
cd app && bun run buildandcd admin && bun run build(needsapi/swagger-spec.json)bun run typecheckat repo rootapp:3000andadmin:3001with API up: login, nav, one agent flow, settings; URLs stay unprefixed (no_prefix)docker build -f app/Dockerfile .anddocker build -f admin/Dockerfile .— entry remainsnode .output/server/index.mjsMade with Cursor