Skip to content

fix(start-os): list default registries first and head them by identity - #4748

Merged
dr-bonez merged 4 commits into
masterfrom
fix/updates-default-registries
Nov 16, 2026
Merged

dr-bonez merged 4 commits into
masterfrom
fix/updates-default-registries

Conversation

@MattDHill

@MattDHill MattDHill commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

On a 0.4.3 beta server, the Updates sidebar lists Start9 Alpha Registry and Start9 Beta Registry under "Default Registries", while Start9 Registry and Community Registry appear under "Custom Registries". The page also opens on Alpha.

Cause

patch-db keeps an object's keys in insertion order, except when it creates the object whole. The 0.4.2.1 migration (v0_4_2_1.rs) built serverInfo.registries from a BTreeMap, so every upgraded server stores its registries sorted by URL. alpha-registry-x… and beta-registry… sort ahead of community-registry… and registry…. The Updates sidebar decided which rows were defaults by position ($index === 2, length > 2), and current() falls back to hosts[0].

Change

  • MarketplaceService.registries$ lists the default registries first, in defaultRegistries order (Start9, then Community), and keeps every other registry in saved order. Every consumer gets this order: the Updates sidebar, the Registries page and the Marketplace.
  • The Updates sidebar groups rows with isDefaultRegistry, the same way the marketplace registry picker does, and shows the headings only when both groups have rows.
  • The Registries page uses isDefaultRegistry for its builtin flag in place of an inline copy.
  • registries$ documents its ordering guarantee.
  • patch-fixed-default-registries-order.md records the fix. Servers that upgraded to 0.4.2.1 with a custom registry sorting ahead of https://registry.start9.com/ show the mislabelled groups.

Verification

  • npm run check:ui (tsc plus the UI node:test suites): 264 pass, 0 fail.
  • Two new regression tests: registries$ ordering in ui.test.mjs, and sidebar grouping plus default selection in updates-availability.test.mjs. Both fail against the pre-fix source.

🤖 Generated with Claude Code

Since saved registries moved to the server's sorted Registries map, the
UI received them in URL order: alpha-registry-x and beta-registry sort
ahead of community-registry and registry. The Updates sidebar labelled
the first two entries "Default Registries" by position, so on beta
builds Alpha and Beta appeared as defaults, and the page opened on
Alpha.

MarketplaceService.registries$ now lists the default registries first,
in defaultRegistries order, keeping the rest in saved order; the
Updates sidebar groups rows with isDefaultRegistry instead of by index.
The registries page reuses isDefaultRegistry for its builtin flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ordering and identity-based grouping look correct: URL normalization, retained custom order, explicit selection, mobile behavior, and registry management remain consistent. git merge-tree confirms this head merges cleanly with master. No functional regression found.

Two required records are missing:

  • Update the pending patch-changed-registry-sync.md fragment. Root AGENTS.md requires unreleased feature refinements to update their existing fragment, rather than omit the changelog. The proposal adds the visible ordering/grouping improvement there; the description's no-fragment explanation should be updated accordingly.
  • Record the ordering guarantee on MarketplaceService.registries$, its production owner. The proposal documents default-list order followed by saved custom order; the new regression test already covers it.

Read-only code review; no builds or tests run. Prettier and changelog/version CI passed at review time; automated tests and other checks remain pending.

Proposed changes: 048827c...proposal/4748

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
helix-white added a commit that referenced this pull request Nov 16, 2026
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ordering contract is now documented, and the implementation still looks correct. The latest head (5bac57ec) merges cleanly with master.

The remaining point is the removed changelog entry and the description's claim that 0.4.2.1 already orders and labels custom registries correctly. The published tag contains all three parts of this defect:

A saved alpha-registry-x.start9.com sorts ahead of Community and Start9 in that source, making the same mislabeling reachable. Please restore the separate fix fragment and correct the release-history explanation. My earlier suggestion to amend the unreleased registry-sync fragment also relied on the wrong introduction date. If the released image differs from the tag, its actual source commit would be needed to establish the unreleased-only claim.

The updated proposal restores only the fix fragment; it does not change implementation. No tests were rerun. A development UI build/run was used solely for screenshot capture, not to verify historical release behavior. Current CI is still pending.

Proposed changes: 5bac57e...proposal/4748

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 586a3de4a. The ordering contract, restored fix fragment, and corrected release-history explanation address the requested changes. The head merges cleanly with master.

The Updates sidebar mistook URL-sorted registry positions for registry identity, putting Alpha/Beta ahead of the defaults. The shared StartOS registry listing now places Start9, then Community, before custom registries while preserving custom order. This also orders registry management and the Marketplace picker consistently. Desktop Updates consequently opens on Start9 when saved; explicit selections and mobile navigation remain unchanged. Sidebar headings appear only when both default and custom groups exist.

The implementation reuses the existing default-registry list, URL comparison, and identity predicate. Registry management also replaces its duplicate default-membership check with that predicate. Saved settings, registry availability, and API contracts do not change.

Implementation diff: +82 / −58 lines in 3 files (excludes lockfiles, tests, docs, release notes, and changelog).

Verification: The author reports npm run check:ui: 264 passing tests, including the two new ordering/grouping regressions that fail against the previous source. I did not rerun tests. For screenshots only, the development UI build succeeded through helix-build and ran in Chromium with local mock data. That build's e230ea6 UI source is identical to this head. Captures cover default-only and mixed Updates lists, registry management, and the Marketplace picker; no live registry or OS-upgrade behavior was exercised. Screenshots follow in a screenshot-only comment.

Current-head CI remains pending, including the Automated Tests workflow and the three architecture builds.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-white

Copy link
Copy Markdown
Member

Updates: Start9 and Community first, with Alpha and Beta under Custom Registries (mock data).

Updates: default-only lists omit group headings (mock data).

Registry management: default registries precede custom registries (mock data).

Marketplace picker: the same default-first order, separated from custom registries (mock data).

@dr-bonez
dr-bonez merged commit 16edbd5 into master Nov 16, 2026
39 of 41 checks passed
@dr-bonez
dr-bonez deleted the fix/updates-default-registries branch November 16, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants