Skip to content

feat(software-center): restructure updates tab and expose automatic updates opt-out - #1247

Open
stephdl wants to merge 20 commits into
feat-8101from
feat-8101-ui
Open

feat(software-center): restructure updates tab and expose automatic updates opt-out#1247
stephdl wants to merge 20 commits into
feat-8101from
feat-8101-ui

Conversation

@stephdl

@stephdl stephdl commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Implement the Software Center UI for automatic updates, per the approved design in NethServer/dev#7976. Frontend only; the backend policy is already enforced on the base branch feat-8101.

Changes

  • Updates tab: two stacked sections, Core update and Applications update, replace the banner pointing at a separate page. Each renders only when it has something to show, with an explicit empty state.
  • Cluster-wide automatic updates: enable and disable from the page kebab menu, with a confirmation modal in both directions and a warning notification while they are off.
  • Per-application automatic updates: same modal from the Applications and per-app instances views, with an "Updates disabled" tag next to the version. Tag and menu entry read a single gate (active subscription plus cluster-wide updates on), since the per-application opt-out has no effect while the timer is off.
  • Notifications: one notification covers core and application updates. Previously the core one hid the application one.
  • Failure paths: every terminal outcome of set-automatic-updates releases the modal; an aborted list-modules is reported instead of leaving the flags silently false.
  • Other: page title tooltip removed (not in the design), pause and play icons on the toggle entry, no more NavigationDuplicated when clicking the active side menu entry.

New file: core/ui/src/components/software-center/AutomaticUpdatesModal.vue — one modal for both scopes; an instance prop switches payload and wording.

Backend contract consumed

  • list-modules: apply_updates_is_active, subscription_is_active, installed[].automatic_updates.
  • set-automatic-updates: { apply_updates_is_active?, instances?: { id: bool } }.

Refs: NethServer/dev#8101
Design: NethServer/dev#7976

@stephdl
stephdl marked this pull request as draft July 24, 2026 14:44
@stephdl stephdl changed the title feat(software-center): expose automatic updates opt-out in UI feat(software-center): restructure updates tab and expose automatic updates opt-out Jul 27, 2026
stephdl added 3 commits July 27, 2026 15:14
Confirm enabling and disabling automatic updates before running the
set-automatic-updates cluster action. One component serves both scopes:
passing an instance switches the payload and the wording.

Freeze the confirmed action when the modal opens, so the caller flipping
its own state cannot rewrite the texts mid-fade. Release the modal on every
terminal outcome, including validation-failed and an outcome that never
arrives, and drop the $root listeners that never fired.
…updates

Rename "instance" and "apps" to "applications" across the Software Center,
add the core update section and automatic updates messages, and drop the
keys left unused by the title tooltip removal.
Show both upgrade cases in the tab instead of a banner pointing at a
separate page: a Core update section with the core card, then an
Applications update section with its description, the bulk update button and
the application cards. Each renders only when it has something to show, and
the empty state states explicitly that nothing is pending.

Merge the two mutually exclusive notifications into one covering core and
application updates, add the cluster-wide automatic updates toggle, and drop
the page title tooltip, absent from the design.

Report an aborted list-modules rather than leaving the cluster-wide flags
silently false, never claim the cluster is up to date when a listing failed,
and keep the bulk update countdown mounted while the list reloads, since it
carries the only way to cancel the armed timer.
@stephdl
stephdl marked this pull request as ready for review July 27, 2026 13:19
stephdl added 3 commits July 27, 2026 15:29
Add the enable and disable entry to the application menu and an "Updates
disabled" tag beside the version. Both read a single gate, so they cannot
disagree: the opt-out is offered only with an active subscription and
cluster-wide automatic updates on, since it has no observable effect while
the timer is off.

Align the version cell contents, which Carbon tags pushed off the text
baseline, and rename the page button to "Go to Core applications" with the
arrow icon, as the design asks.
Add the enable and disable entry to the instance menu and the "Updates
disabled" tag beside the version, behind the same gate as the applications
view.

Report an aborted list-modules instead of leaving the page in a loading
skeleton with no error.
vue-router rejects a push to the current location, and the rejection was
unhandled, so clicking the already active entry logged NavigationDuplicated.
@stephdl
stephdl requested a review from AmaLuci August 3, 2026 10:21
@stephdl
stephdl requested review from andre8244 and removed request for AmaLuci August 6, 2026 16:00
Comment thread core/ui/src/components/software-center/AutomaticUpdatesModal.vue Outdated
Comment thread core/ui/src/styles/_core.scss Outdated
Comment thread core/ui/src/views/ApplicationsCenter.vue Outdated
Comment thread core/ui/src/views/SoftwareCenter.vue Outdated
Comment thread core/ui/src/views/SoftwareCenter.vue Outdated
Comment thread core/ui/src/views/SoftwareCenter.vue
Comment thread core/ui/src/views/SoftwareCenter.vue Outdated
Comment thread core/ui/src/views/SoftwareCenterAppInstances.vue Outdated
@stephdl
stephdl requested a review from andre8244 August 25, 2026 14:52
The page manages the installed estate but kept only the per-instance
opt-out: the warning notification and the cluster-wide switch lived in
Software center alone, so there was no way to turn automatic updates off
for every app from here.

Add the same warning notification, and a kebab menu next to the Core
applications button holding the switch and a link back to Software
center. The shared modal is reused: the cluster-wide path clears the
instance it targets, which otherwise outlives its own modal.
The page toolbar sits next to the same kebab menu as Software center but
drew its button as tertiary, and the label ran wider than the one it
faces. Use the same secondary kind and drop the Go to prefix.
…enter"

This reverts commit 6874ca8. Keep the tertiary button with its right
arrow and the Go to Core applications label.
The table kept a logo only when it was an absolute URL, which is what a
repository serves. An app installed outside any repository publishes its
logo with its own UI bundle, and list-modules reports that local path, so
those rows fell back to the generic logo while the app drawer, fed by the
same data, showed the right one.

Take the module logo, then the instance one, whatever their form. A
published bundle can disappear, so keep the default logo as an error
fallback rather than letting a broken image through.
Installing an app refreshed the drawer, but removing one left it there,
on both the Applications and the Software center pages, and a clone or a
move never reached it either. The drawer lists the same estate, so it
kept showing apps that were gone and missed the ones just created.

Emit reloadAppDrawer from the two uninstall handlers, and from the clone
modal itself so a single emission covers both pages, the way the install
modal already does.
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