You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build one shared "edit config as JSON" mechanism — a FileSystemProvider-backed virtual scheme — that the bucket-settings JSON editors (#65 lifecycle, #66 CORS, #68 notifications, #78 bucketInfo) all use, instead of four ad-hoc implementations.
Why
The UX-coherence audit found these four features are near-identical "open current config → edit JSON → persist to B2" flows. Implementing them with openTextDocument({ content })breaks: Cmd+S triggers Save As (a file dialog) instead of persisting back to B2. A FileSystemProvider under a dedicated scheme (e.g. b2-config:/<bucket>/<kind>.json) makes save write back to B2 natively, with dirty state, diff, and reload.
What it provides
A b2-config:FileSystemProvider: readFile fetches the live config as pretty JSON; writeFile validates and persists via the matching SDK setter (setLifecycleRules / setCORSRules / setNotificationRules / bucket update).
Bundled $schema per config kind (jsonValidation) for completion, hover docs, and inline validation.
Summary
Build one shared "edit config as JSON" mechanism — a
FileSystemProvider-backed virtual scheme — that the bucket-settings JSON editors (#65 lifecycle, #66 CORS, #68 notifications, #78 bucketInfo) all use, instead of four ad-hoc implementations.Why
The UX-coherence audit found these four features are near-identical "open current config → edit JSON → persist to B2" flows. Implementing them with
openTextDocument({ content })breaks:Cmd+Striggers Save As (a file dialog) instead of persisting back to B2. AFileSystemProviderunder a dedicated scheme (e.g.b2-config:/<bucket>/<kind>.json) makes save write back to B2 natively, with dirty state, diff, and reload.What it provides
b2-config:FileSystemProvider:readFilefetches the live config as pretty JSON;writeFilevalidates and persists via the matching SDK setter (setLifecycleRules/setCORSRules/setNotificationRules/ bucketupdate).$schemaper config kind (jsonValidation) for completion, hover docs, and inline validation.hmacSha256/ Authorization headers (Manage bucket event notification (webhook) rules #68) + change-only writes so masked values aren't clobbered.ifRevisionIson write so a save doesn't silently clobber concurrent changes (Add command to view and edit a bucket's custom bucket-info metadata #78).showErrorMessage, never a partial write.Acceptance criteria
Cmd+Son ab2-config:doc persists to B2 (no Save-As prompt).$schemadriving completion + validation.Out of scope