Skip to content

Conversation

@JanZachmann
Copy link
Contributor

@JanZachmann JanZachmann commented Jan 21, 2026

Summary

This PR includes two related fixes for the network configuration system:

1. Fix Vue Reactivity for Adapter Online/Offline Status with Dirty Forms

Issue: The Online/Offline status chip was not updating when the user had unsaved form changes and the network cable was removed.

Root Cause:

  • NetworkSettings.vue watcher had an early return when form was dirty
  • This blocked Vue's reactivity dependency tracking
  • Template couldn't re-evaluate props.networkAdapter.online changes
  • Bug was latent but exposed when :key was added to v-window-item

Solution:

  • Allow watcher to execute even when form is dirty
  • Only conditionally call resetFormFields() when form is clean
  • This maintains Vue's reactivity tracking for non-form props

Additional Improvements:

  • Test refactoring: consolidated network tests into 2 files (network-configuration.spec.ts and network-multi-adapter.spec.ts)
  • Core validation to prevent hidden components from sending updates
  • 5 new regression tests for online/offline status updates
  • Fix for rollback modal appearing on wrong adapters

2. Enable Previously Skipped Tests

Rust Unit Test: tick_increments_attempt_counter

  • File: src/app/src/update/device/network/verification.rs
  • Issue: Test was marked with #[ignore] due to difficulty verifying HTTP effects

E2E Test: "Rollback modal should close on second apply after a rollback"

  • File: src/ui/tests/network-configuration.spec.ts
  • Issue: Marked with test.fixme() due to flaky re-login logic and persistent error snackbars after rollback

Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com

…irty forms

The Online/Offline status chip was not updating when:
1. User had unsaved form changes (dirty form)
2. Network cable was removed (adapter went offline)

Root Cause:
- NetworkSettings.vue watcher had early return when form dirty
- This blocked Vue's reactivity dependency tracking
- Template couldn't re-evaluate props.networkAdapter.online changes
- Bug was latent but exposed when :key was added to v-window-item

Solution:
- Allow watcher to execute even when form is dirty
- Only conditionally call resetFormFields() when form is clean
- This maintains Vue's reactivity tracking for non-form props

Also includes:
- Test refactoring: consolidated network tests into 2 files
- Core validation to prevent hidden components from sending updates
- 5 new regression tests for online/offline status updates
- Fix for rollback modal appearing on wrong adapters

Tests: 46 passing, 1 skipped (fixme)

Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Fixed two previously skipped tests:

1. Rust unit test: tick_increments_attempt_counter
   - Removed #[ignore] attribute
   - Test verifies that new IP healthcheck attempts increment counter
   - Added explicit panic for unexpected state to improve test clarity

2. E2E test: Rollback modal should close on second apply after a rollback
   - Removed test.fixme() annotation and FIXME comments
   - Fixed flaky re-login logic after rollback acknowledgment
   - Added proper state cleanup: navigate to '/' instead of reload
   - Handle persistent rollback dialog after page navigation
   - Reset browser hostname after reload to restore current connection
   - Add explicit waits for Core/Centrifugo initialization
   - Use separate variables (confirmDialog2, rollbackCheckbox2) for
     second network change to avoid scope issues
   - Clear input field before filling to ensure change detection

All tests now pass reliably.

Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
@JanZachmann JanZachmann changed the title fix: enable previously skipped unit and E2E tests fix: Vue reactivity for adapter status and enable skipped tests Jan 21, 2026
@JanZachmann JanZachmann merged commit ab9db07 into omnect:main Jan 21, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant