Skip to content

Show Pixi workspace version in UI - #515

Merged
MUFFANUJ merged 11 commits into
nebari-dev:mainfrom
MUFFANUJ:versionLabel
Sep 11, 2026
Merged

MUFFANUJ merged 11 commits into
nebari-dev:mainfrom
MUFFANUJ:versionLabel

Conversation

@MUFFANUJ

@MUFFANUJ MUFFANUJ commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Reference Issues or PRs

Fixes #508

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Documentation

Access-centered content checklist

Text styling

  • The content is written with plain language (where relevant).
  • If there are headers, they use the proper header tags (with only one level-one header: H1 or # in markdown).
  • All links describe where they link to (for example, check the Nebari website).
  • This content adheres to the Nebari style guides.

Non-text content

  • All content is represented as text (for example, images need alt text, and videos need captions or descriptive transcripts).
  • If there are emojis, there are not more than three in a row.
  • Don't use flashing GIFs or videos.
  • If the content were to be read as plain text, it still makes sense, and no information is missing.

Any other comments?

Update the versions UI to show the workspace version from pixi.toml as the primary label, while keeping Nebi’s internal counter visible as the snapshot number. The backend now derives manifest_version from stored pixi.toml content and the remote proxy preserves it, so local and remote version views use the same clearer wording.

Also fixes a pre-existing remote proxy issue where workspace version descriptions were dropped from the remote version history response.

Before

Screen.Recording.2026-08-18.at.3.23.31.PM.mov

After

Screen.Recording.2026-08-18.at.3.40.04.PM.mov

@netlify

netlify Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for nebi-docs ready!

Name Link
🔨 Latest commit 308982f
🔍 Latest deploy log https://app.netlify.com/projects/nebi-docs/deploys/6a84dc8226e1060008b24405
😎 Deploy Preview https://deploy-preview-515--nebi-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@MUFFANUJ MUFFANUJ self-assigned this Aug 18, 2026
@pmeier
pmeier requested a review from tylerpotts August 25, 2026 08:36
@pmeier pmeier assigned tylerpotts and unassigned MUFFANUJ Aug 25, 2026

@tylerpotts tylerpotts left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this, the approach is clean and the test coverage is exactly right: parser table test, service-level derivation with a mutation-proof assertion, proxy round-trip, and a component test. Verified locally at 68d5d36: Go and vitest pass, and regenerating swagger produces no diff.

Requesting changes only because the branch conflicts with main in two files. Everything else inline is a suggestion. One decision I need to make as maintainer is called out in the summary comment below.

}
}

func TestExtractWorkspaceVersion(t *testing.T) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice table test. Precedence, project fallback, missing field, and malformed TOML are all pinned.

ContentHash: "sha-test",
CreatedBy: userID,
Description: "Initial workspace creation",
ManifestVersion: "ignored",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Seeding ManifestVersion: "ignored" and asserting the derived value wins is a good way to prove this is read-derived and never persisted.

Comment thread internal/service/workspace.go Resolved
var versions []models.WorkspaceVersion
err := s.db.
Select("id", "workspace_id", "version_number", "job_id", "created_by", "description", "created_at").
Select("id", "workspace_id", "version_number", "manifest_content", "job_id", "created_by", "description", "created_at").

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggestion (non-blocking): this widens the list Select to pull manifest_content for every row and parse it. Fine at current sizes. If it ever shows up in profiles, the precedent is ContentHash: compute once at snapshot time and store a column.

// Version tracking
VersionNumber int `gorm:"not null;index:idx_ws_version" json:"version_number"` // Auto-incrementing per workspace
// ManifestVersion is derived from the stored pixi.toml [workspace]/[project] version.
ManifestVersion string `gorm:"-" json:"manifest_version,omitempty"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggestion: this is the first gorm:"-" field in models. The repo's pattern for computed fields is a wrapper type like WorkspaceResponse in internal/service/types.go. Not blocking, the approach works and avoids a migration, just noting the convention.

Comment thread internal/pixi/pixi.go Resolved
Comment thread internal/cliclient/types.go Resolved
@tylerpotts

Copy link
Copy Markdown
Collaborator

Fixes #508 as described: both local and remote views now show the pixi.toml version, with the internal counter kept visible as the snapshot number.

Two things not tied to a line:

  1. Vocabulary. The UI now calls the counter a "snapshot". I'm fine with that rename, but the server-written rollback description should follow in this PR (inline comment above). CLI column headers and the "Rolled back ... to version N" CLI message can be a follow-up issue; I'll open one.
  2. Docs screenshots. docs/src/content/docs/examples/version-rollback.md embeds rollback.png and active_version.png, which show the old "Version 3" heading and "v3" badge. The prose is still accurate. Recapture those two images if you have a moment, otherwise I'll do it after merge.

Once the rebase is in, I'll re-review quickly.

@MUFFANUJ

MUFFANUJ commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

Updating the docs now!

@MUFFANUJ

MUFFANUJ commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

Updated the docs:

Screenshot 2026-09-05 at 5 05 50 AM

@MUFFANUJ
MUFFANUJ requested a review from tylerpotts September 4, 2026 23:39
Resolve conflicts with nebari-dev#565, which made src/lib/utils.ts registry-owned
(cn() only) and split the app helpers into src/lib/status.ts and
src/lib/strings.ts. getWorkspaceVersionLabel moves out of utils.ts into a
new src/lib/versions.ts with its tests; VersionHistory and
RemoteWorkspaceDetail import it from there, and RemoteWorkspaceDetail
picks up main's relocated user-badge, status and strings imports.
@tylerpotts

Copy link
Copy Markdown
Collaborator

@MUFFANUJ I took the liberty of resolving the conflicts on main and pushed to this branch

@tylerpotts tylerpotts left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed at 94f3924. The conflicts are resolved (I pushed that merge), and every in-PR suggestion from the last round is applied in 5dbc301: the two rollback description strings, the slog.Warn on parse failure, the struct reuse in internal/pixi, the shared getWorkspaceVersionLabel helper (now in frontend/src/lib/versions.ts since main made utils.ts registry-owned), and the Description note in the PR body. Thanks for turning those around quickly.

Verified locally at 94f3924: Go tests pass, vitest 267/267, biome clean, swagger regeneration produces no diff, and the new versions.test.ts goes red if the "Snapshot N" fallback is changed.

One thing left, and it is the only reason this is still Changes Requested:

Blocker: the recaptured screenshots in 5cd238e show the wrong cards. docs/src/content/docs/examples/version-rollback.md walks the reader through expanding the v2.0 card and clicking Rollback, then shows the new rollback-created version marked Current. The previous images matched that (the "Pushed as ml-pipeline:v2.0" card, then "Version 6 / Rolled back to version 3 / Current"). The new ones do not:

  • docs/public/img/rollback.png now shows the v3.0 card (Snapshot 4, "Pushed as ml-pipeline:v3.0"), which is the broken release the tutorial is rolling back from.
  • docs/public/img/active_version.png now shows the plain v4.0 push (Snapshot 5) as Current, not a rollback result.

Could you recapture both with the new UI? rollback.png should be the v2.0 card (Snapshot 3) expanded with the Rollback button visible, and active_version.png should be the card the rollback creates, which will read "Rolled back to snapshot 3" with the Current badge.

Suggestion (one line): cmd/nebi/workspace_version.go:82 help text still says the command creates a "Rolled back to version N" snapshot. This PR changed the actual description to "snapshot", so that sentence is now wrong. Since it is one word and this PR made it stale, I would fix it here. The rest of the CLI vocabulary (table headers, the rollback success message) is tracked in #569 as promised.

Once the screenshots are in I will approve.

@MUFFANUJ

Copy link
Copy Markdown
Member Author

Does this looks right?
Screenshot 2026-09-12 at 12 21 49 AM

@tylerpotts tylerpotts left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Good work on this!

@MUFFANUJ
MUFFANUJ merged commit 78f671d into nebari-dev:main Sep 11, 2026
14 checks passed
@MUFFANUJ
MUFFANUJ deleted the versionLabel branch September 11, 2026 19:07
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.

[BUG] - Version in pixi.toml should match version in the UI

2 participants