Add model version switcher under Options menu#629
Merged
Conversation
Replaces the standalone SelectBox in the menubar with a "Set model version ..." submenu under Options, sibling to "Set language ...". Submenu is hidden when no Versions block is configured; the entry matching the active version is disabled so it can't be re-selected. Strictly-older picks still trigger the existing Confirm dialog before navigation. MainMenu keeps setVersions() as the public entry point — it delegates the menu population to OptionMenu and applies the matching per-locale title to the page header. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Read a Versions: block from the deployment YAML (label, url, version, title per locale), expose it from get_cfg, and on the SPA side hand it to MainMenu.setVersions() and Info.setVersions() so the new "Set model version ..." submenu and the dataset table can react to the sibling-version metadata. The active-version title from the Versions entry overrides GUI.title in the page header. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the dataset_version filter in DB::Datasets.load so the dataset table shows datasets from sibling model versions, then expose activeVersion on the DatasetTable and install a custom row renderer that lowers the opacity of rows whose dataset_version doesn't match the active Model.version. The version column is made visible so the mismatch is legible. Makes the version switcher actually useful: users can see their existing datasets from a different version and switch over to the matching deployment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`qx compile --update-po-files` after relocating the version switcher into OptionMenu: the "Set model version ..." label is new, the two older-version Confirm strings now reference OptionMenu.js, and the SelectBox-tooltip "Switch model version" is marked as no longer used. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a fixture YAML with two Versions: entries and assert that Agrammon::Config.versions exposes them as the expected list of hashes with label/url/version/title fields. Also asserts the existing no-Versions config produces an empty versions list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
caf3447 to
8623b2b
Compare
Contributor
Author
|
Merged after visual local test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a model version switcher driven by a new optional
Versions:block in the deployment YAML. Companion to the cross-version enum-alias support already onmain(merged via #628) — together they let users navigate between sibling deployments of different model versions without losing access to their existing datasets.Configuration
Versions:block in deployment YAML — list of{ label, url, version, title }entries pointing at sibling instances. Leave the block out (or empty) to hide the switcher entirely.Agrammon::Config.versionsaccessor +get_cfgexposes the list to the SPA.Frontend
title:from the matchingVersionsentry overridesGUI.titlein the page header so users always see which version they're in.dataset_versiondoesn't match the activeModel.version(newagrammon.ui.table.rowrenderer.DatasetVersion). The version column is made visible so the mismatch is legible.Backend
DB::Datasets.loadno longer filters bydataset_version, so foreign-version datasets show up (and the frontend fades them).Session sharing
main(resume_session route + SPA call): same Postgres-backed session cookie is honored across sibling instances, so switching versions does NOT prompt for re-login.Test plan
prove6 -l t/config.rakutest— new positive test forVersions:parsing (2 new subtests, fixture YAML)prove6 -l t/webservice.rakutest—get_cfgincludesversions => []when no block configuredmake test— full suite against test DB🤖 Generated with Claude Code