Skip to content

Pull Request: Fixes for NodeCard and ObjectDetail #67

Merged
cgalibern merged 7 commits into
opensvc:mainfrom
PaulJouvanceau:dev
Jun 2, 2026
Merged

Pull Request: Fixes for NodeCard and ObjectDetail #67
cgalibern merged 7 commits into
opensvc:mainfrom
PaulJouvanceau:dev

Conversation

@PaulJouvanceau

Copy link
Copy Markdown
Contributor

Changes
fix(NodeCard): show "Not Provisioned" icon only for explicit false value

Previously, the "Not Provisioned" icon might appear in ambiguous cases (e.g., null or undefined).

Now it is displayed only when the provisioning flag is strictly false.

fix(ObjectDetail, NodeCard): improve data reactivity and action menus

Enhanced reactivity of data bindings in both components to avoid stale UI states.

Fixed issues with action menus not updating correctly after data changes.

Improved menu interaction consistency across detail views.

…lues

Previously, the icon appeared for any falsy value including "n/a",
which caused incorrect warnings for objects like clusters where
provisioned is legitimately "n/a". Now the icon is shown only when
provisioned is exactly false or "false".

Updated NodeCard logic and adjusted tests accordingly:
- Removed dependency on parseProvisionedState
- Added tests for false, "false", true, and "n/a" cases
- Replace Popper with Menu for batch and individual node actions to ensure full display
- Use fine-grained selectors from useEventStore for reactive data updates (objectStatus, objectInstanceStatus, instanceMonitor, instanceConfig)
- Derive memoized state (objectData, memoizedObjectData, nodesList) that automatically re-renders on store changes
- Add error handling for useEventStore.subscribe: wrap subscriptions in try/catch and validate unsubscribe return type, logging warnings on failures
- Update NodeCard to accept setIndividualNodeMenuAnchor prop for compatibility with tests and parent
- Remove French comments

Fixes stale data after SSE events and incomplete action menu display.
…lues

Previously, the icon appeared for any falsy value including "n/a",
which caused incorrect warnings for objects like clusters where
provisioned is legitimately "n/a". Now the icon is shown only when
provisioned is exactly false or "false".

Updated NodeCard logic and adjusted tests accordingly:
- Removed dependency on parseProvisionedState
- Added tests for false, "false", true, and "n/a" cases
- Replace Popper with Menu for batch and individual node actions to ensure full display
- Use fine-grained selectors from useEventStore for reactive data updates (objectStatus, objectInstanceStatus, instanceMonitor, instanceConfig)
- Derive memoized state (objectData, memoizedObjectData, nodesList) that automatically re-renders on store changes
- Add error handling for useEventStore.subscribe: wrap subscriptions in try/catch and validate unsubscribe return type, logging warnings on failures
- Update NodeCard to accept setIndividualNodeMenuAnchor prop for compatibility with tests and parent
- Remove French comments

Fixes stale data after SSE events and incomplete action menu display.
…e persistence

Change the SSE query parameter from `replay=true` to `cache=true` to
enable proper caching of historical events on the backend. This prevents
data loss after page refresh (F5) and ensures that heartbeat statuses,
node lists, and event logs are correctly restored from the server cache
instead of relying solely on localStorage.

- Updated createQueryString() to use `cache=true` instead of `replay=true`
- Maintains all existing event filtering and buffer flushing logic

Fixes issues where heartbeats disappeared and nodes showed infinite
loading after a hard reload.
@cgalibern cgalibern merged commit 2ff8a12 into opensvc:main Jun 2, 2026
1 check 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.

2 participants