Skip to content

fix: resolve navbar flash on navigation and workload protocol error#3388

Open
HerbertJulio wants to merge 1 commit intodevfrom
fix/ENG-36926-workload-protocol-optional-chaining
Open

fix: resolve navbar flash on navigation and workload protocol error#3388
HerbertJulio wants to merge 1 commit intodevfrom
fix/ENG-36926-workload-protocol-optional-chaining

Conversation

@HerbertJulio
Copy link
Contributor

Summary

  • Fix navbar flashing/collapsing on every route navigation
  • Fix Cannot read properties of undefined (reading 'http') runtime error in Workload protocol settings
  • Add skeleton loading state to navbar during bootstrap/reload

Root Cause

  • logoutGuard called startLoading() on every navigation, causing the entire navbar to collapse and rebuild
  • protocolSettingsBlock.vue accessed nested properties without optional chaining on a potentially undefined object

Changes

  • src/router/hooks/guards/logoutGuard.js — Move startLoading() inside the logout condition only
  • src/layout/index.vue — Add isBootstrapping computed (based on persisted hasSession) for skeleton state; wrap router-view in flex container to fix footer positioning
  • src/layout/app-navbar.vue — Replace isLoading prop with isBootstrapping for skeleton display
  • src/views/Workload/FormFields/blocks/protocolSettingsBlock.vue — Add optional chaining to all protocols.http accesses

Test plan

  • Navigate between pages — navbar should NOT flash/collapse
  • Reload a private page while logged in — navbar skeleton should appear briefly then resolve
  • Login page — no skeleton in navbar, footer visible
  • Logout — works correctly, no theme change
  • Workload edit view — no console errors for protocol settings
  • Create/edit workload with HTTPS/HTTP3 — protocol settings work correctly

ENG-36926

…36926)

- logoutGuard: only call startLoading for logout routes instead of
  every navigation, eliminating the navbar flash
- layout: use isBootstrapping computed (hasSession + route meta) to
  control navbar skeleton and footer visibility, replacing loading store
- layout: wrap router-view to prevent footer from sticking to header
- workload form: add optional chaining to protocols.http access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant