Skip to content

Commit b20dac6

Browse files
pmaxhoganclaude
andcommitted
docs(ui): update the versioning-capability comments for the new backend split
The SourceTable and Restore doc comments still named S3 and the local folder as the destinations that cannot keep versions, which is now false: both keep real versions in a `.driven-versions` area, and SFTP is the only exception. Comment-only; the components already read the capability from the descriptors rather than a hardcoded list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xKUm9vH4ifb5LHR5szy1v
1 parent 8b5445d commit b20dac6

2 files changed

Lines changed: 25 additions & 19 deletions

File tree

ui/src/components/SourceTable.vue

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@ const accountEmailById = computed<Record<string, string>>(() => {
122122
*
123123
* This genuinely differs per backend rather than being a wording choice, so a
124124
* single sentence could only ever be wrong somewhere: Drive keeps a superseded
125-
* object in its trash (recoverable for ~30 days), while an S3 or local-folder
126-
* destination has no trash and the re-upload lands on the SAME deterministic key,
127-
* overwriting the previous copy. The versioning panel used to state Drive's
128-
* behaviour unconditionally, directly contradicting the S3 setup screen's own
129-
* "S3 has no trash" warning inside the same app.
125+
* object in its trash (recoverable for ~30 days), an S3 or local-folder
126+
* destination keeps it in a `.driven-versions` area Driven owns there (pruned to
127+
* the per-source limit, and NOT a recovery path for deletions), and SFTP keeps
128+
* nothing at all. The versioning panel used to state Drive's behaviour
129+
* unconditionally, directly contradicting the S3 setup screen's own "S3 has no
130+
* trash" warning inside the same app.
130131
*
131132
* Unseeded / unknown backends fall back to the neutral `default`, because
132133
* `BackendKind::ALL` is Rust-owned and gains entries ahead of the locale file.
@@ -141,8 +142,9 @@ function retentionNote(accountId: string): string {
141142
* Issue #220: the destination CAPABILITY descriptors, joined to a source by its
142143
* account's `backendKind`. Fetched rather than hardcoded, following #219: the set
143144
* of backends and what each can do is Rust-owned (`driven_backend::descriptors()`),
144-
* so a UI-side "S3 and local cannot version" list would silently rot the moment a
145-
* backend's create path changes.
145+
* so a UI-side list of which backends can version would silently rot the moment
146+
* one gains or loses the ability - as S3 and the local folder did when #220 part 2
147+
* gave them a real version store.
146148
*/
147149
const backends = ref<BackendDto[]>([]);
148150
async function loadBackends(): Promise<void> {
@@ -159,10 +161,12 @@ async function loadBackends(): Promise<void> {
159161
/**
160162
* Whether this source's DESTINATION can really keep previous versions.
161163
*
162-
* A destination whose create key is derived from the file name (S3, local folder)
163-
* re-uploads over the previous copy, so a retained version points at the CURRENT
164-
* bytes and "restore as of an earlier date" would return today's content while
165-
* reporting success (issue #220). The editor is not offered there.
164+
* A destination that cannot put the superseded bytes under an object of their own
165+
* re-uploads over the previous copy, so a retained version would point at the
166+
* CURRENT bytes and "restore as of an earlier date" would return today's content
167+
* while reporting success (issue #220). Since part 2 that is SFTP alone - Drive,
168+
* S3 and the local folder all keep the old bytes - but the answer is read from the
169+
* descriptors, never assumed. The editor is not offered where it is false.
166170
*
167171
* An UNKNOWN or not-yet-loaded backend resolves PERMISSIVE, matching the house
168172
* rule from #219 (`setup.ts` / `AddSourceWizard.vue` both `?? true`) so a

ui/src/views/Restore.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,13 @@ const retentionNote = computed<string>(() => {
9797
* Issue #220: whether the BROWSED source's destination can really serve an older
9898
* version, so the point-in-time picker is honest to offer.
9999
*
100-
* Where the destination's create key is derived from the file name (S3, local
101-
* folder) a changed file's re-upload overwrote the previous bytes, so a restore
102-
* "as of" an earlier date would return the CURRENT content while reporting that it
103-
* restored an older version. The backend refuses such a restore fail-closed; this
104-
* stops the app OFFERING it in the first place.
100+
* Where the destination cannot put the superseded bytes under an object of their
101+
* own, a changed file's re-upload overwrote them, so a restore "as of" an earlier
102+
* date would return the CURRENT content while reporting that it restored an older
103+
* version. Since #220 part 2 that is SFTP alone - Drive, S3 and the local folder
104+
* all keep the old bytes - but the answer is read from the descriptors, never
105+
* assumed. The backend refuses such a restore fail-closed; this stops the app
106+
* OFFERING it in the first place.
105107
*
106108
* Unknown / not-yet-loaded resolves permissive (the #219 house rule) - the control
107109
* must not blink away on every mount, and the backend is the real gate.
@@ -429,9 +431,9 @@ async function onClearSearch(): Promise<void> {
429431
each file as it was backed up at that instant.
430432
431433
Issue #220: only offered where the destination can really keep previous
432-
versions. On a destination whose create key is derived from the file
433-
name the older bytes were overwritten, so this control could only ever
434-
hand back the current content while claiming otherwise. -->
434+
versions. Where the superseded bytes were overwritten rather than
435+
archived aside, this control could only ever hand back the current
436+
content while claiming otherwise. -->
435437
<label v-if="canRestoreAsOf" class="flex items-center gap-1.5 text-sm">
436438
<span class="text-zinc-600 dark:text-zinc-400">{{ t("restore.asOf.label") }}</span>
437439
<input

0 commit comments

Comments
 (0)