Skip to content

[fix] the save picker was the last place still selling folders as customers - #213

Merged
Lanznx merged 1 commit into
mainfrom
fix/save-picker-folders-linger
Aug 9, 2026
Merged

[fix] the save picker was the last place still selling folders as customers#213
Lanznx merged 1 commit into
mainfrom
fix/save-picker-folders-linger

Conversation

@Lanznx

@Lanznx Lanznx commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What this changes

Two upgrade wounds left visible after #212, both reported from a real install the moment it updated:

  1. Pre-flight still showed two choosers. The save-destination picker ("save somewhere else" + the Settings default) still listed every personal folder, so the meeting screen offered a customer picker and a folder picker — the exact split [refactor] the customer owns the recording — one answer to "whose call is this", not two #211 removed everywhere else. Personal options are now the root only; orgs keep their folders (an org has no companies). A legacy personal-folder default still resolves, and a startup normalization rewrites it to the root so the picker shows the truth.
  2. Every folder appeared twice. The registry genuinely held same-name twins from the dev/packaged dual-instance id ping-pong (documented in history/folders.ts); ensureCompanyFolder adopts only one of each pair. A new startup dedupe merges them: recordings repointed onto the survivor (company-paired preferred, else oldest), twins deleted locally and in the cloud — the mirror-down in reloadFolders would otherwise resurrect them next launch. Groups where several companies claim the same name are skipped: merging those on a name match would move recordings between customers.

Migration order is now pairing → dedupe → owner backfill, so the backfill sees the merged registry.

Why

Follow-up to #211 / #212 — the refactor's own screen was contradicting it.

How it was verified

  • bunx tsc --noEmit passes
  • bunx vitest run passes (327 tests, +5 for planFolderDedupe: paired-survivor, oldest fallback, same-named-companies skip, 3-way clone group)
  • Ran the app: opened pre-flight → 改存別處 → the dropdown offers 個人 ·(根目錄)only, no personal folders
  • Added or updated tests
  • No new user-facing strings

Screenshots

Dropdown after the change: one 個人 option (root), org groups when signed in.

…tomers

#211 demoted folders everywhere except one spot: the save-destination
picker (pre-flight's "save somewhere else" and the Settings default)
still listed every personal folder — so the first screen of a meeting
showed a customer picker AND a folder picker, the exact two-answers
split the refactor removed. Personal options are now just the root; orgs
keep their folders (an org has no companies). A legacy personal-folder
default still resolves, and a startup normalization rewrites it to the
root so the picker shows the truth.

That picker is also where users SAW the second pre-#211 wound: the
registry can hold same-name folder twins (the dev/packaged dual-instance
id ping-pong, see history/folders.ts), and ensureCompanyFolder adopts
only one of each pair. A new startup dedupe merges them — recordings
repointed onto the survivor (company-paired preferred, else oldest),
twins deleted locally and in the cloud so the mirror-down doesn't
resurrect them. Groups where several companies claim the same name are
skipped: that's two same-named customers, and merging on the name would
move recordings between them.

Ordering: pairing → dedupe → owner backfill, so the backfill sees the
merged registry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Lanznx
Lanznx merged commit 29743c5 into main Aug 9, 2026
@Lanznx
Lanznx deleted the fix/save-picker-folders-linger branch August 9, 2026 03:25
@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

Lanznx added a commit that referenced this pull request Aug 9, 2026
… choice left (#214)

Even after #213 trimmed the save picker to one personal option, pre-flight
still showed a 存到 section with a folder-shaped dropdown — a control whose
only remaining personal choice was itself. The user's read was correct:
if the customer decides filing, no folder control belongs on the meeting
screen at all.

The 存到 section is gone. Filing is the customer's folder (or the root
with no customer) with nothing to choose; the one real decision left —
share a copy to an org — is now its own row, shown only when signed in
with sync on, and phrased as sharing rather than saving.

The share is also independent of the customer now. The old override
model made an org "save destination" beat the company link, silently
dropping the local copy at the root — sharing to a team un-filed the
customer's own recording. resolveMeetingSave now composes them: local
filing always follows the customer; autoShare rides alongside.

- meetingSaveOverride → meetingOrgShare ("off" suppresses a default
  share for one meeting; null follows the settings default)
- SaveDestinationPicker → OrgSharePicker (off + orgs/org folders only)
- Settings "default save location" becomes "auto-share to an
  organization"; the stored DefaultSaveLocation shape is unchanged, so
  existing org defaults keep working and personal ones mean "off"

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant