Files
skillshare/internal/server
Willie 372dd65768 fix(extras): enforce --force contract and consistent status for transform extensions
Transform-extension sync previously wrote each generated file via
runExtensionFile unconditionally, so a regular local target file (e.g. a
hand-edited hello.toml) could be overwritten from hello.md without --force,
violating the same conflict contract that copy/merge modes honor.

- Split runExtension (subprocess → bytes) from runExtensionFile (writes),
  and have syncExtraTransform apply the conflict/force rules: idempotent
  when identical, skipped on conflict without --force, overwrite with
  --force, and auto-replace leftover symlinks.
- Centralize the copy-only mode rule in SyncExtra so the API and CLI reject
  extension+merge/symlink identically; align the server sync handler's mode
  normalization (EffectiveMode's "merge" default no longer leaks through).
- CLI `extras list` no longer short-circuits to an "extension" status before
  existence/drift checks. Status is now computed via output_ext-aware
  CheckSyncStatus; a new Extension field carries the display label, decoupled
  from sync status (plain-text + TUI rendering updated).
- Roll back the optimistic cache update in the UI mode-change handler on
  failure (fixes the unused-var build break).

Adds regression tests covering conflict skip/force/idempotent/symlink-replace
and non-copy mode rejection.
2026-05-30 19:23:12 +08:00
..
2026-04-11 03:37:48 +08:00
2026-04-14 18:16:11 +08:00
2026-04-19 09:29:18 +08:00
2026-04-19 09:29:18 +08:00
2026-04-19 09:29:18 +08:00