## Problem
Object versions are sorted by `created_at`, but a version's `created_at`
doesn't always reflect when it was written. When a bucket is suspended,
an upload replaces the null version in place and keeps that row's
original `created_at`, so the current version can show up below older
ones in the versions panel.
## Solution
Sort by `archived_at`. The current version has no `archived_at`, so it
comes first, followed by the most recently archived.
Co-authored-by: Claude <noreply@anthropic.com>
## Problem
Non-current versions in storage weren't showing the correct expiration
value based on the lifecycle policies settings.
## Solution
Fix client logic and improve communication around expiration.
Adding "Archived at" info make the version history crowded, so some
information has been moved into the dropdown menu of each noncurrent
version.
<img width="445" height="314" alt="Screenshot 2026-11-26 at 16 58 23"
src="https://github.com/user-attachments/assets/efb345f7-9a1c-4a53-b5e2-8b05505f9856"
/>
Note: when the "Newest noncurrent versions to keep" threshold is met,
older versions that exceed such thresholds will expire no earlier than
in 1d.
## Review instructions
- Enable object versioning and set lifecycle policies on a File Storage
bucket
- add new versions to reach and exceed policy threasholds
- check that expiration rules apply as intended
## What
Moves the `ResponseError` class (`types/base.ts`) and the classified
error classes (`types/api-errors.ts`) into
`lib/errors/studio-errors.ts`, and renames `ResponseError` to
`StudioError`.
## Why
Studio's error classification is being expanded to cover errors that
don't come from API responses (thrown network failures, aborted
requests, unexpected client errors). The API-specific name and location
no longer fit. Landing the rename on its own keeps the follow-up PR,
which introduces the classified error model, small and reviewable.
## Notes for reviewers
- Mechanical change, no behavior change. Most of the diff is a one-line
import change per file plus import re-sorting by Prettier.
- Files that only use the type now use `import type { StudioError }`.
- `ResponseError` is no longer re-exported from `@/types`; there are no
compatibility shims at the old paths.
- Unrelated identifiers like `QueryResponseError` and
`parseResponseErrors` are unchanged.
TanStack Start 1.169 is the stable release. This moves the shared
catalog to Start 1.169.2 and Router 1.170.44, the newest matching pair
that clears the 72-hour release-age gate, and updates Studio React Query
and its devtools to 5.104.3. The ui-library TanStack auth blocks switch
to `.validator()` because Start 1.169 removes `.inputValidator()`.
**Changed:**
- `pnpm-workspace.yaml` – `@tanstack/react-router` `^1.170.44` and
`@tanstack/react-start` `^1.169.2`, so Router, Start, router-core, and
the Start plugin install as one set
- `pnpm-lock.yaml` – react-router 1.170.44, react-start 1.169.2,
router-core 1.171.37, router-plugin 1.168.46, start-plugin-core
1.171.53, history 1.162.5, and Studio React Query 5.104.3
- `apps/studio/package.json` – `@tanstack/react-query` and
`@tanstack/react-query-devtools` `~5.104.3`,
`@tanstack/react-router-devtools` `^1.167.2`
-
`apps/ui-library/registry/default/blocks/password-based-auth-tanstack/routes/auth/confirm.ts`
– `createServerFn` uses `.validator()`
-
`apps/ui-library/registry/default/blocks/social-auth-tanstack/routes/auth/oauth.ts`
– `createServerFn` uses `.validator()`
- `apps/ui-library/tests/sign-up-redirect.test.tsx` – the
server-function mock follows the `validator` chain
- `apps/ui-library/public/r/password-based-auth-tanstack.json` –
registry JSON regenerated from the block
- `apps/ui-library/public/r/social-auth-tanstack.json` – registry JSON
regenerated from the block
- `apps/ui-library/content/docs/tanstack/password-based-auth.mdx` – note
that the block requires `@tanstack/react-start` 1.168.25 or later, since
`.validator()` is missing from earlier Start versions
- `apps/ui-library/content/docs/tanstack/social-auth.mdx` – note that
the block requires `@tanstack/react-start` 1.168.25 or later, since
`.validator()` is missing from earlier Start versions
- `apps/studio/server.ts` – correct the header comment:
`wrapFetchWithSentry` only adds a span, trace meta tags, and a flush,
and request errors are captured by the Sentry middleware in `start.ts`
**Removed:**
- `minimumReleaseAgeExclude` pins for:
- `@tanstack/react-router@1.170.41`
- `@tanstack/react-start-client@1.168.39`
- `@tanstack/react-start-rsc@0.1.59`
- `@tanstack/react-start-server@1.167.46`
- `@tanstack/react-start@1.168.60`
- `@tanstack/react-store@0.11.2`
- `@tanstack/router-core@1.171.34`
- `@tanstack/router-generator@1.167.40`
- `@tanstack/router-plugin@1.168.42`
- `@tanstack/start-client-core@1.170.34`
- `@tanstack/start-plugin-core@1.171.49`
- `@tanstack/start-server-core@1.169.39`
- `@tanstack/start-storage-context@1.167.36`
- `@tanstack/store@0.11.2`
## To test
- TanStack Studio, open a project home – the shell loads with no router
error
- TanStack Studio, open a table, switch schema, then Back and Forward –
the table id follows history, and Forward returns to the later table
- TanStack Studio, run a query in the SQL Editor – results render
- TanStack Studio, open Project Settings – the general settings page
renders
- Next Studio, repeat home, Table Editor, SQL Editor, and Settings – the
same pages render
- ui-library TanStack password and social auth blocks, follow a sign-up
confirm and OAuth confirm link – the server function accepts the search
params through `.validator()` and redirects
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
## Problem
When uploading a file with same name of already existing file, the ui
automatically creates a new file with incremental number and doesn't
consider the scenario of giving the possibility of storing the new
upload as a version of the already existing file.
## Solution
Provide modal to chose the behaviour when name conflict happens when
uploading a file:
- Replace existing file (same file with version history)
- Keep both (new file with incremental numbering)
https://github.com/user-attachments/assets/ee192be9-4087-4e14-89f1-1c82acf550cd
Manage edge case of clashes with files created when bucket had
versioning enabled (so with `is_versioned` flag to true) and clashing
upload happens when bucket is in SUSPENDED state.
https://github.com/user-attachments/assets/00694c77-07c1-405e-bd54-bdf0bf99d274
Unrelated fix:
- add "Delete permanently" action when selecting multiple files with
versioning enabled
<img width="510" height="203" alt="Screenshot 2026-10-13 at 15 59 27"
src="https://github.com/user-attachments/assets/5692fc23-2fd3-4259-9de2-3932aecbccd0"
/>
## This PR
On a versioned bucket a file or a version can be "soft deleted/archived"
or "permanently deleted".
- `archived-objects-query.ts` — `ArchivedObject` /
`ArchivedObjectVersion` types + `archivedObjectsQueryOptions`
- `archived-object-restore-mutation.ts` — bring an archived object back
into the live tree
- `archived-object-purge-mutation.ts` — delete it and every version,
permanently
- `archived-object-version-delete-mutation.ts` — remove one retained
version
- `archivedOverlay.utils.ts` — synthesizes the explorer rows for one
folder from the archived list
- `archivedVersions.utils.ts` — an archived object's history as one
flat, newest-first list
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
| # | Branch | Base |
| - | ------ | ---- |
| 1 | `feat/storage-versioning-private-alpha` — merged | `master` |
| 2 | `feat/storage-versioning/002-bucket-form-fields` | `master` |
| 3 | `feat/storage-versioning/003-bucket-modals` | 2 |
| 4 | `feat/storage-versioning/004-object-versions-data` ◀ | 3 |
| 5 | `feat/storage-versioning/005-file-preview-versions` | 4 |
| 6 | `feat/storage-versioning/006-billing-storage-retention` | 5 |
| 7 | `feat/storage-versioning/007-archived-objects-data` | 6 |
| 8 | `feat/storage-versioning/008-archived-rows` | 7 |
| 9 | `feat/storage-versioning/009-archived-preview-pane` | 8 |
| 10 | `feat/storage-versioning/010-replace-file` | 9 |
## [4/10] Storage object versioning: object versions data layer
**Base:** `feat/storage-versioning/003-bucket-modals` (PR 3)
### This PR
The query and mutation hooks for the version history UI, written to
`queryOptions` using the real Storage endpoints.
- `object-versions-query.ts` — the version list, plus `ObjectVersion`
and `LifecyclePolicy`
- `object-version-restore-mutation.ts` — promote a noncurrent version to
current
- `object-version-delete-mutation.ts` — remove one specific version
- `object-purge-mutation.ts` — delete an object and every version,
bypassing versioning
- `VersionHistory.utils.ts` — `computeVersionFate`, the pure rule
deciding what removal outlook each version row shows
- `BroomSparklesIcon.tsx` — inline SVG for a glyph absent from
lucide-react 0.436
Easier to test directly from next PR in the stack #49208 which wires the
queries to the real file preview panel ui.
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>