Skip to content

fix(updates): the Updates page no longer offers the release that is already installed - #193

Merged
Panelica merged 2 commits into
Panelica:mainfrom
ertugrulkeyvan:fix/updates-installed-release
Oct 16, 2026
Merged

Panelica merged 2 commits into
Panelica:mainfrom
ertugrulkeyvan:fix/updates-installed-release

Conversation

@ertugrulkeyvan

Copy link
Copy Markdown
Contributor

What

I tried the new install script and the in-app updater on a fresh Ubuntu 24.04 server: install.sh with 1.5.0, the wizard, then Setup -> Updates on the beta channel to 1.6.0-beta.1. Both worked; the update took about ten seconds and kept everything. Two things on the Updates page afterwards:

  1. The installed release was still offered. After the update the page said "1.6.0-beta.1 is installed" and, right below, "PNLCS 1.6.0-beta.1 is available" with its Update now button. latest.json is written by the daily check (05:10), so this lasted until the next morning. Pressing the button there cannot work: the preflight refuses a release that is not newer, so the operator got "The update did not start" and a list of things to resolve whose only item is that 1.6.0-beta.1 is not newer than 1.6.0-beta.1. The update bar already leaves out a release that is no longer newer (UpdateBar, "A release installed since the last check is no longer news"); the page did not.
  2. The beta badge could not be read. It used badge-warning, which the admin stylesheet does not define: white text on the card's white header.

How

  • UpdateController::latest(): reads latest.json and drops the offered release when it is not newer than the installed version, the same comparison UpdateBar makes. The page and the request behind its buttons both use it. When nothing newer is on offer, the page shows the existing "up to date on the channel" line.
  • A page left open from before the update: its button now leads back to the page instead of queueing the installed release again.
  • Badge: badge-pending, the amber badge the admin pages already use, on the Updates page and in the update bar.

Tests

On the same server with these three files in place, the page says "PNLCS 1.6.0-beta.1 is up to date on the beta channel" with no button, and with a newer beta offered the badge reads amber on the page and in the update bar.

tests/Feature/UpdatesPageTest.php, three new tests; all three fail on main and pass here:

  • the installed release is not offered, and the page says the installation is up to date;
  • a stale page cannot queue the installed release;
  • the beta badge uses a class the admin stylesheet has.

Full suite: 4222 passed. The one failure is the CurrencyAndBackupTest db backup test, which fails on main too in my local setup.

…lready installed

The release check runs once a day and its result is kept. After an update
from Setup -> Updates the page went on announcing the version it had just
installed, with its Update now button, until the next morning's check. The
update bar already leaves out a release that is no longer newer; the page
and the request behind the button now do the same, so the page says the
installation is up to date and a page left open from before cannot queue
the installed release again.
The badge used badge-warning, which the admin stylesheet does not define,
so it was white text on the card's white header. It now uses badge-pending,
the amber badge the admin pages already use, on the Updates page and in the
update bar.
@Panelica
Panelica merged commit 62d039e into Panelica:main Oct 16, 2026
1 check passed
@Panelica

Copy link
Copy Markdown
Owner

Thank you @ertugrulkeyvan, merged in 62d039e.

Testing the real install and update path on a fresh server and reporting what the Updates page showed afterwards is exactly the kind of check that catches this. We verified it here as well:

  • The three new tests fail on main and pass with your change.
  • The page and the request behind its buttons now use the same comparison as the update bar, and a stale page leads back instead of queueing the installed release.
  • badge-warning is indeed not defined in the admin stylesheet; badge-pending is.
  • Full suite on the merged branch: 4223 passed, 3 skipped, 0 failed. The CurrencyAndBackupTest failure you saw did not occur here, so it looks specific to your local setup.

This will be part of the next release.

Panelica pushed a commit that referenced this pull request Oct 21, 2026
Selling Panelica licenses with a partner account (the Panelica Licenses page, the module, the customer's own install command), knowledge base and announcements in more than one language (#201, #203), the knowledge base search (#202), retrying a refused domain registration (#197), keeping the card that paid (#209), reports and statuses in the admin's language (#208, #205), the Panelica module's messages in the customer's language (#199), the registrant's phone on domain orders (#196), panel sign-in by name (#200), and the fixes of #193, #194, #195, #198, #204, #206 and #207. Database: three new translation tables. A MINOR beta, the second of 1.6.0.
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