Skip to content

Vue 3 migration#1036

Draft
Tim020 wants to merge 4 commits into
devfrom
feature/vue3-migration
Draft

Vue 3 migration#1036
Tim020 wants to merge 4 commits into
devfrom
feature/vue3-migration

Conversation

@Tim020
Copy link
Copy Markdown
Contributor

@Tim020 Tim020 commented May 13, 2026

No description provided.

)

* Add Vue 3 migration skeleton (Phase 0) — issue #1033

Creates client-v3/ alongside the existing Vue 2 client/, serving a
placeholder Vue 3 app at /ui-new/ via a new RootControllerV3. Both
frontends build and serve independently.

Backend: RootControllerV3 + /ui-new/assets/ and /ui-new/ handlers in
app_server.py (registered before the Vue 2 catch-all route).

client-v3 stack: Vue 3.5 / Pinia 3 / Vue Router 5 / Bootstrap-Vue-Next
0.45 / Vite 8 / ESLint 10 / TypeScript strict mode.

CI: lint, typecheck, and test jobs added for client-v3 in nodelint.yml
and client-test.yml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix formatting

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added github GitHub actions related issue or pull request server Pull requests changing back end code xlarge-diff git labels May 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Client V3 Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
1 files    0 ❌

Results for commit 8d44a46.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Client Test Results

128 tests   128 ✅  0s ⏱️
  6 suites    0 💤
  1 files      0 ❌

Results for commit 8d44a46.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Python Test Results

  1 files    1 suites   1m 29s ⏱️
603 tests 603 ✅ 0 💤 0 ❌
608 runs  608 ✅ 0 💤 0 ❌

Results for commit 8d44a46.

♻️ This comment has been updated with latest results.

@Tim020 Tim020 linked an issue May 13, 2026 that may be closed by this pull request
* Add Vue 3 core infrastructure (Phase 1) — issue #1033

Pinia stores (user/auth, system/RBAC, websocket), useWebSocket() composable,
HTTP interceptor, full router with beforeEach guard, platform/utils/logger
ports, API types, constants, full BVN navbar App.vue, and stub views.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix BVN component rendering and visual parity with Vue 2

- Switch to BApp wrapper + unplugin-vue-components/BootstrapVueNextResolver
  for automatic per-component tree-shaken imports (no global plugin needed)
- Add bootstrap-vue-next/dist/bootstrap-vue-next.css import in main.ts
- Add data-bs-theme="dark" to BNavbar so text renders white on info background
  (Bootstrap 5 equivalent of Bootstrap 4's type="dark")
- Add components.d.ts to tsconfig includes for GlobalComponents type augmentation
- Gitignore components.d.ts (auto-generated by unplugin-vue-components on build)
- Fix NotFoundView copy and centering to match Vue 2 404View exactly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix npm ci lockfile sync for @emnapi/core and @emnapi/runtime

These are transitive deps of @rolldown/binding-wasm32-wasi (cpu: wasm32).
npm doesn't install the wasm32 binding on macOS arm64, so their lockfile
entries were missing. Added as optionalDependencies to force inclusion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix lockfile: add @emnapi/core and @emnapi/runtime as explicit devDeps

These are transitive deps of @rolldown/binding-wasm32-wasi (cpu: wasm32).
npm skips that binding on macOS arm64 so its deps never get lockfile
entries, causing npm ci to fail on Linux CI.

Adding them explicitly to devDependencies forces npm to resolve and
record their entries in the lockfile on all platforms.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the client Pull requests changing front end code label May 14, 2026

const handler = actionMap[action];
if (handler) {
await handler(data);
Tim020 and others added 2 commits May 14, 2026 22:00
- stores/help.ts: Pinia port of Vuex help module with manifest loading, document
  cache, and Fuse.js full-text search
- components/MarkdownRenderer.vue: async marked v18 API via watch+ref; :deep() CSS
  selectors; import.meta.env.BASE_URL for portable help links across base paths
- views/HomeView.vue: reads systemStore.currentShow/settings + userStore.currentUser;
  currentShowSession stubbed null until Phase 6
- views/AboutView.vue: static content port
- views/HelpView.vue: BVN port with sticky sidebar, debounced search, dynamic navbar
  height offset
- views/help/HelpDocView.vue: cache-first doc loading, watch route.params.slug
- router: wire /about and /help routes; fix /help child redirect to absolute path;
  fix catch-all to render NotFoundView in-place (no URL redirect) matching Vue 2
  behaviour

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…Change) (#1039)

- Port LoginView and ForcePasswordChangeView to BVN + @vuelidate/core v2
- Add useFormValidation and usePasswordValidation composables
- Add changePassword() action to user store
- Wire /force-password-change route to real component

Bug fixes discovered during verification:
- stores/user: authToken was a non-reactive getter reading localStorage, causing
  Pinia to cache null on first access and never re-evaluate; moved to reactive
  state field with _setToken/_clearToken actions keeping localStorage in sync
- http-interceptor: exclude login endpoint from 401 handling to avoid logout
  cascade on bad credentials
- stores/websocket: websocketHealthy getter incorrectly required authenticated=true;
  corrected to match Vue 2 behaviour (connection only)
- views/LoginView: missing @submit.prevent on BForm caused native form submission
- main.ts: import theme-sugar.css and create toast.ts singleton with position
  top-right; replace scattered useToast() calls with the shared instance

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
17.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Pull requests changing front end code git github GitHub actions related issue or pull request server Pull requests changing back end code xlarge-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate front end to Vue.js 3.x

2 participants