Project format updates
This commit is contained in:
@@ -27,19 +27,19 @@ await client.close();
|
||||
|
||||
The shared UI provides a searchable project overview, recent activity, project creation, an active-project header, file/media browsing, transfer actions and a Tauri-compatible HTML confirmation for dirty project switches. English and Dutch labels are included. It inherits ISA extension theme tokens; detailed application workflows and planning remain in the extension. Components consume a captured client instance: remount with a new client when the launch context changes.
|
||||
|
||||
`client.activate(reference)` opens a listed or recent reference after verifying its manifest. In shared group mode it also refreshes folder identity and access from the launch group's catalog. `client.create(name, operationId?)` creates an ordinary folder and publishes its manifest after the standard subdirectories exist. It retains the same operation ID and folder through uncertain retries in the current client. Callers with durable recovery journals should provide their persisted operation ID. Recent references are private, launch-scoped host preferences rather than canonical project state. Preference failures are observable on `session.preferenceError` and do not invalidate an already committed creation/switch.
|
||||
`client.activate(reference)` opens a listed or recent reference after verifying its manifest. In shared group mode it opens the single selected folder through the host and revalidates its identity and access in the launch group. `client.create(name, operationId?)` creates an ordinary folder and publishes its manifest after the standard subdirectories exist. It retains the same operation ID and folder through uncertain retries in the current client. Callers with durable recovery journals should provide their persisted operation ID. Recent references are private, launch-scoped host preferences rather than canonical project state. Preference failures are observable on `session.preferenceError` and do not invalidate an already committed creation/switch.
|
||||
|
||||
Sessions capture their project path and abort signal. `readJson` returns an authoritative CAS base; `writeJson(relative, value, base, {operationId?})` requires that same file’s base and sends its revision/hash. `ensureDirectory(relative)` creates real parent directories in order; `openKv` does this for its parent before opening a store. A requested synchronized store uses offline storage when the granted parent is synchronized. Otherwise, new stores use the ordinary online filesystem contract. `openKv`, `applyKv` and `subscribeKv` use the captured project destination. Use `extensionPath` for extension-owned paths, `publishStatus` for summaries and `readStatuses` for the overview. Subscriptions and registered cleanup callbacks close on switching; late results cannot use a retired session. Mark unsaved work with `session.markDirty()`. Without explicit confirmation, dirty sessions block switching. Mounting the shared UI supplies a confirmation; applications can provide `beforeSwitch` to integrate an existing save/discard workflow.
|
||||
|
||||
## Project start screen
|
||||
|
||||
Use `sharedProjectsFolder: true` with `filesystem: appInfo.filesystem` for the shared group overview. Declare `group_projects_read` and `filesystem_read` in the extension manifest. The host advertises `supportsSharedGroupProjects` and `filesystem_list_group_projects` when the launch group supports automatic project access. The catalog lists projects created for the launch group through `filesystem_create_group_project`. Each has a direct `/shared/*.isap` path and a manifest that the client verifies. Members can open these projects on their first visit. Earlier projects retain their existing folder access. A writable extension with `filesystem_write` uses `filesystem_create_group_project` to create or import into the same group. Opening a writable project provisions the extension's namespace, where it can initialize its own data. Older hosts display an update instruction.
|
||||
Use `sharedProjectsFolder: true` with `filesystem: appInfo.filesystem` for the shared group overview. Declare `group_projects_read` and `filesystem_read` in the extension manifest. On a host advertising `filesystem_list_group_projects` and `filesystem_open_group_project`, the overview reads the active group's existing file inventory. It lists the active group’s `.isap` folders with valid manifests, including projects created in other extensions. Each row reports whether the extension already has its own instance in the project (`hasInstance`). Listing projects gives the extension no file grants. Selecting a project asks the host for access to that folder using the member's current rights and the extension's declared filesystem permissions. A writable session can create the extension's instance inside the selected project. `filesystem_create_group_project` reserves an ordinary folder for a new project or import. The client creates the standard subdirectories and publishes `project.json` last. The dashboard creates these folders in the originating group’s project directory. Workspace admins retain administrative access. A creator who leaves the group has no ownership exception.
|
||||
|
||||
### Other client configurations
|
||||
|
||||
The default client uses the user's selected folders for listing and creation, including on hosts that advertise the group project catalog.
|
||||
|
||||
Use `client.withListedProject(row, action)` for project-specific background initialization. The callback receives a temporary session and leaves the active project and recent activity intact. ISA Projects initializes its first planning board with a stable ID when a writable shared project opens.
|
||||
Use `client.withListedProject(row, action)` for an explicitly selected project that requires a temporary session. The callback receives a temporary session and leaves the active project and recent activity intact. ISA Projects initializes its first planning board with a stable ID when a writable shared project opens.
|
||||
|
||||
Pass `groupFolder: true` to `createProjectClient` to use the extension’s folder for the current launch group as its default project location. This mode requires the host command `filesystem_ensure_group_folder`. The client lists projects from that folder and any additional folders the user has selected. New projects and project imports use the group folder.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user