Skip to content

Vue 3 migration: Phase 5 — system configuration page (/config)#1042

Merged
Tim020 merged 5 commits into
feature/vue3-migrationfrom
feature/vue3-migration-phase-5
May 17, 2026
Merged

Vue 3 migration: Phase 5 — system configuration page (/config)#1042
Tim020 merged 5 commits into
feature/vue3-migrationfrom
feature/vue3-migration-phase-5

Conversation

@Tim020
Copy link
Copy Markdown
Contributor

@Tim020 Tim020 commented May 17, 2026

Summary

  • Ports the admin /config section (6-tab interface) from Vue 2 to Vue 3
  • Implements ConfigView, ConfigSettings, ConfigShows, ConfigSystem, ConfigUsers, ConfigBackups, ConfigLogs components
  • Implements user management child components: CreateUser, ResetPassword, ConfigRbac, RbacResource
  • Adds ConfirmDialog composable + component to replace window.confirm with a styled BModal dialog, reusable across the whole V3 frontend
  • Extends stores/system.ts with scriptModes, connectedSessions, versionStatus state and getScriptModes, getConnectedSessions, getVersionStatus, checkForUpdates actions
  • Wires /config router entry to the real view (was PlaceholderView)

Notable implementation details

  • BTabs uses lazy prop to defer tab component mount — prevents all 6 tabs' polling timers starting simultaneously on page load
  • BCollapse accordion uses :model-value/@update:model-value (not :visible) to preserve the slide transition animation — BVN's useShowHide disables animation when the visible prop is used directly
  • ConfigLogs streams live log output via the Web Streams API (response.body.getReader()) with 400ms debounce on search inputs and auto-scroll when near the bottom
  • ConfigSystem and ConfigUsers use setTimeout-based recursive polling (1s and 5s respectively) cleaned up in onBeforeUnmount

Test plan

  • Navigate to /ui-new/config as admin — 6 tabs render (Shows, System, Settings, Users, Logs, Backups)
  • Shows: table lists shows; "Setup New Show" modal opens, date validation works, Save/Save and Load create show; Load button switches active show
  • System: version badge shown; Connected Clients modal opens; Check for Updates posts correctly
  • Settings: categories expand/collapse with slide animation; settings editable; dirty badge counts update; Save patches /api/v1/settings
  • Users: user list shown; New User/New Admin modals open with username uniqueness validation; RBAC modal shows per-resource tabs with Grant/Revoke; Reset Password displays temp password; Delete user shows confirm dialog
  • Logs: static mode loads logs with filters; Live mode streams via SSE; auto-scroll works
  • Backups: list shown with size/date; Delete shows confirm dialog and removes entry
  • Non-admin user is redirected away from /config
  • ConfirmDialog (BModal) appears for all destructive actions — no window.confirm dialogs

🤖 Generated with Claude Code

@github-actions github-actions Bot added github GitHub actions related issue or pull request client Pull requests changing front end code server Pull requests changing back end code xlarge-diff git labels May 17, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 17, 2026

Client V3 Test Results

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

Results for commit 4975877. ± Comparison against base commit 28e5ea5.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 17, 2026

Client Test Results

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

Results for commit 4975877. ± Comparison against base commit 28e5ea5.

♻️ This comment has been updated with latest results.


const handler = actionMap[action];
if (handler) {
await handler(data);
@Tim020 Tim020 changed the base branch from dev to feature/vue3-migration May 17, 2026 10:06
@github-actions
Copy link
Copy Markdown

Python Test Results

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

Results for commit 9a89af4.

Tim020 and others added 5 commits May 17, 2026 11:09
Ports the admin /config section — Shows, System, Settings, Users, Logs,
Backups — from Vue 2 Vuex to Vue 3 Pinia with bootstrap-vue-next.

Key patterns introduced:
- BModal via ref<InstanceType<typeof BModal>> (replaces v-b-modal directive)
- #footer slot (replaces #modal-footer in BVN)
- window.confirm replaces $bvModal.msgBoxConfirm
- SSE log streaming via Web Streams API (response.body.getReader())
- setTimeout-based polling with onBeforeUnmount cleanup
- Dynamic Vuelidate rules computed from server-returned setting types
- Cross-field date validators using helpers.withMessage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Creates a singleton useConfirm() composable backed by a BModal-based
ConfirmDialog component, replacing all window.confirm() calls with a
styled, accessible modal dialog that matches the rest of the UI.

ConfirmDialog is mounted once in App.vue; all callers share the same
instance via module-level reactive state. Supports title, okVariant,
okTitle, and cancelTitle options mirroring BV2's msgBoxConfirm API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
V2 used plain horizontal tabs with lazy mounting, not the vertical pill
layout carried over from the user settings page. Also restores lazy prop
so tab content only mounts on first activation, avoiding all polling
timers (sessions, users) starting simultaneously on page load.

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

BVN's BCollapse :visible prop sets localNoAnimation=true in useShowHide,
bypassing the Bootstrap 5 collapsing transition entirely. Switching to
:model-value/@update:model-value keeps animation enabled. Expanded state
changed from string[] to Record<string, boolean> to support v-model binding
per category key.

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

Bootstrap 5 has no built-in .form-group margin; the global dark.scss adds
margin-bottom: 1rem to .b-form-group, but the inline style="margin-bottom: 0"
copied from V2 was overriding it, causing rows to appear compacted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Tim020 Tim020 force-pushed the feature/vue3-migration-phase-5 branch from 9a89af4 to 4975877 Compare May 17, 2026 10:09
@github-actions github-actions Bot removed github GitHub actions related issue or pull request client Pull requests changing front end code server Pull requests changing back end code git labels May 17, 2026
@sonarqubecloud
Copy link
Copy Markdown

@Tim020 Tim020 merged commit e69a7a9 into feature/vue3-migration May 17, 2026
16 checks passed
@Tim020 Tim020 deleted the feature/vue3-migration-phase-5 branch May 17, 2026 10:10
@Tim020 Tim020 linked an issue May 17, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate front end to Vue.js 3.x

2 participants