JITSU-125 Show recent workspaces inline in the workspace switcher#1421
Merged
vklimontovich merged 1 commit intoJul 23, 2026
Conversation
JITSU-125 Switcher now lists the 10 most-recently-used workspaces (selected by last-used server-side, rendered alphabetically for a stable order), preloaded on mount and refreshed in the background on switch. A "More" link covers the rest. GET /api/workspace now orders by the current user's last-used time at the DB level via a raw-SQL LEFT JOIN, so ?limit=N returns the real N most recent instead of an oldest-created page re-sorted in memory.
There was a problem hiding this comment.
Reviewed the two modified files (WorkspacePageLayout.tsx and pages/api/workspace/index.ts) with a focus on correctness, security, and user-visible regressions.
I verified the recent-workspace dropdown wiring, pagination/ordering behavior, and the new raw SQL query construction for parameter safety and access scoping. I did not find actionable bugs or security issues in this changeset.
vklimontovich
deleted the
vladimir/jitsu-125-show-workspaces-inline-in-the-workspace-switcher-dropdown
branch
July 23, 2026 14:23
Contributor
|
🚀 |
vklimontovich
added a commit
that referenced
this pull request
Jul 23, 2026
…1422) Follow-up to #1421 (that PR merged before this commit synced into it, so this change was left behind). The switcher dropdown showed **two** links to `/workspaces` — a "More (N)" item **and** "All Workspaces". This removes the duplicate "More" item and folds the count into the single "All Workspaces" link, formatted with a thousands separator and shown only when there are more workspaces than listed inline: - Before: `More (5738)` + `All Workspaces` - After: `All Workspaces (5,748)` JITSU-125
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.
What
Switching workspaces took an extra hop: the switcher dropdown only linked to the
/workspacespage. This lists the user's most-recently-used workspaces inline in the dropdown, so the common case is one click.JITSU-125
Changes
Client —
WorkspacePageLayout.tsx(WorkspaceSelector/WorkspacesMenu)/{slug|id}.queryClient.invalidateQueries— the dropdown is closed at switch time, so set-membership updates off-screen with no flicker.More (N)link to/workspaceswhen there are more than shown.Server —
pages/api/workspace/index.tsGET /api/workspacenow orders by the current user's last-used time at the DB level (raw-SQLLEFT JOINonWorkspaceUserProperties,ORDER BY lastUsed DESC NULLS LAST), so?page=0&limit=Nreturns the true N most-recent. Previously the DB page was ordered bycreatedAtand only re-sorted in memory, so?limit=10returned the 10 oldest-created.Testing
pnpm codegen+tsc --noEmitclean.