Skip to content

Implement File System Access pickers and handles over AppScene native panels #248

Description

@wieslawsoltes

Active implementation checkpoint — 20 September 2026

Exact merged heads are WebScene ca4b6b4ba2a6699970ee78b2b8acc795dc968e77, AppScene 724bf58bd56951e5c102db256ccb220964fa90ae, and unchanged Code OSS 645f29cc3176500b4b5762ba887cf2a7f0ffdf2c. Local vscode-demo is c8ce793d, intentionally unpushed, with Actions disabled. One-agent mode remains active.

Linux workspace stack merged

The dependent GitHub stack is complete and merged bottom-to-top:

  1. AppScene Intercept parser and nested-frame resources through Service Workers #312 / PR Batch mutable stylesheet publication #315 → merge 1321ecc1: complete linked WebScene v2 panel/grant ABI with one fail-closed family capability.
  2. AppScene Generate shared CSS property identity metadata #313 / PR Generate native CSS property identity #316 → merge 4295d7da: bounded Linux opaque grant authority for same-entry, ancestry, ranged reads, atomic writes, paged directory operations, create/remove, durable partition/origin-bound locators, and release.
  3. AppScene Restore CSS property metadata generator #314 / PR Generate native CSS grammar families #317 → merge 724bf58b: XDG Desktop Portal open-file/open-folder/save-file integration, filters/options/initial location, capability grants, queue wakeup, profile storage, cancellation, and teardown.

This reusable SDK implementation requires no Code OSS source change and adds no Electron, Chromium, CEF, WebView, GTK, shell, or helper-process dependency. Source, ABI, package, lifecycle, adversarial-path, bounded-memory, latency, idle-CPU, and unchanged-product gates are committed and documented. They were intentionally not executed under the fast implementation instruction. PR checks reported failures before the admin merges; no pass is claimed. Obsolete PR jobs were canceled. The newest AppScene main Linux SDK run 35498051568 also completed with failure, and no CI jobs remain queued. AppScene #318 is the native sub-issue for focused CI repair.

Consolidation status

Focused implementations are on their main branches. Consolidations remain open and unmerged: WebScene PR #76 at 3ed3a70cddb216ecf89dbefdbf59ab447fafdb9a, AppScene PR #65 refreshed at 3a92b02, and vscode-demo PR #1. The local demo submodule points to AppScene 724bf58b, WebScene ca4b6b4b, and unchanged Code OSS 645f29cc; local commit c8ce793d is not pushed.

Remaining order

  1. AppScene Audit CSS property metadata completeness #318: repair the recorded project-policy and Linux SDK CI failures at one exact main head. Then AppScene Implement effective CSS property cascade semantics #305 and WebScene Publish installed full-V8 Runtime components for Linux and Windows #809 execute the retained installed-package, portal/grant, Ubuntu VM, visual, lifecycle, memory, performance, idle-frame, and unchanged Code OSS workspace/Explorer/open-edit-save-restart gates.
  2. AppScene Make retained inset parsing portable on macOS #306: publish the installed Win32/D3D12/Graphite Runtime host and desktop services.
  3. AppScene Split IndexedDB bootstrap below the MSVC literal limit #307: publish multi-RID Runtime components through .asproj and doctor/build/run/publish, including relocatability, dependency, disk-size, and fail-closed gates.
  4. vscode-demo Implement Windows DirectWrite font positioning #12: build Release packages and qualify workspace/Explorer, terminal latency, Markdown/webviews, visual geometry, accessibility, input, CSS/product performance, memory, lifecycle, package size, and recursive no-browser evidence.
  5. Keep CSS [Epic] CSS features, compatibility, validation, and performance #235, file API Implement File System Access pickers and handles over AppScene native panels #248, Runtime package [Epic] Restore full V8 Linux and Windows package portability #687/Publish installed full-V8 Runtime components for Linux and Windows #809, and all coordination epics synchronized as new evidence or reduced defects appear.

Cross-repository parent epic: SceneTech/AppScene#122
Native host capability: SceneTech/AppScene#123
Related broad platform scope: SceneTech/AppScene#32

Problem

Unchanged VS Code browser and extension consumers use showOpenFilePicker, showDirectoryPicker, showSaveFilePicker, FileSystemFileHandle, and FileSystemDirectoryHandle when operating on local file: resources. WebScene does not expose the complete File System Access contract and AppScene currently has no typed native panel request, so local open/save and extension dialog calls cannot complete without an application patch.

The remote SimpleFileDialog path is tracked separately and remains the first VS Code workspace path. This issue owns the reusable browser API layer over the native capability from AppScene#123.

Proposed implementation

  • Implement the three picker entry points with secure-context/user-activation checks, options validation, cancellation, and DOMException-compatible errors.
  • Add file and directory handles with stable identity, kind/name, getFile, writable streams, directory iteration, relative resolution, permission query/request, and explicit release semantics required by audited consumers.
  • Map only typed bounded data to AppScene#123; never expose Cocoa objects or Electron-shaped APIs to JavaScript.
  • Stream file reads/writes with backpressure and atomic save/replace behavior. Avoid whole-file and whole-directory copies when not required by the web contract.
  • Define persisted grants/bookmarks by origin/profile and reject stale or cross-origin handles.
  • Add WPT-derived contracts plus native mock-host integration and packaged unchanged-consumer tests.

Acceptance

  • Web-compatible open-file, open-directory, save-file, cancel, denial, and malformed-option behavior passes in main window, iframe, and extension-host consumer contexts where applicable.
  • Handles support the exact VS Code/extension calls discovered by the audit and remain stable across allowed persistence/reopen.
  • Text/binary files, Unicode names, empty files, large streamed files, nested directories, multi-select, overwrite, and failures preserve bytes and error classes.
  • User activation cannot be replayed and one request completes exactly once.
  • WPT/native/browser contracts pass with bounded memory, copied bytes, handles, requests, and latency.
  • Packaged acceptance proves extension showOpenDialog/showSaveDialog plus local open/save without Electron or browser processes.

Schedule

Agree the typed schema with AppScene#123 after the remote picker baseline is captured. Implement AppScene request/response and WebScene API as a two-PR dependent stack; validate the cumulative top, then merge the focused stack before consolidated product gates.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions