Require .isap extensions to initialize missing project data

This commit is contained in:
Sander Grootendorst
2026-11-28 23:53:14 +01:00
parent 7293c98920
commit f5c98df67c
2 changed files with 16 additions and 0 deletions
@@ -61,6 +61,7 @@ Before shipping an extension or documenting a new capability, verify:
- Local grants can be revoked in Settings and access stops after revocation. - Local grants can be revoked in Settings and access stops after revocation.
- Project pickers check `get_app_info.projects.commands`; archive and restore - Project pickers check `get_app_info.projects.commands`; archive and restore
are shown only when `projects_set_archived` is advertised. are shown only when `projects_set_archived` is advertised.
- Open another extension’s project from **Projects**. Verify one click initializes this extension’s data, simultaneous first opens converge on the same data, and reopening preserves it. Check the original project ID, read-only access, a failed read and an unlinked group. [Project start screen](20-dashboard-backed-project-sync.md#project-start-screen)
- The default project list hides archived projects. Archive management calls - The default project list hides archived projects. Archive management calls
`projects_list` with `includeArchived: true` and distinguishes `archived` `projects_list` with `includeArchived: true` and distinguishes `archived`
projects from deleted or unknown ids. projects from deleted or unknown ids.
@@ -63,6 +63,21 @@ foreign key in its own canonical files.
In both models, project contents live below the extension's authoritative group In both models, project contents live below the extension's authoritative group
folder. folder.
### Project start screen
Selecting a row opens that project. On hosts advertising `projects_open_listed`, invoke it with the stable `projectId` and use the folder reference returned by the host. On older hosts, reopen the selected folder using its existing grant. If access is unavailable, show the access error on the overview. Read the extension’s saved record after the host grants access.
| Result of reading the extension record | What the user sees |
| --- | --- |
| A valid record exists | Open the saved workspace for that project. |
| The dashboard confirms the record is absent and the user can write | Create the extension’s initial data in the selected folder and open its workspace immediately. Use the shared project name wherever a name is required. |
| The record is absent and access is read-only | Show the empty workspace in read-only mode or explain that initialization requires write access. |
| The read failed or returned invalid or uncertain data | Show the problem and allow a retry. Preserve the existing project contents. |
Use `projects_create` when the user explicitly creates a shared project, reusing the same `operationId` on retry. On first open of an existing `.isap`, initialize just the data owned by the opening extension under the original project identity. Use `session.ensureExtensionJson(relativePath, makeDefault)` for a canonical JSON record. For collections, use an empty directory or store when zero items is valid. If a first item is required, use a stable ID and a create-only write after confirming the collection is empty. Concurrent and interrupted opens must reuse the saved data. Collect optional details and source uploads inside the open workspace.
**Verify with two extensions in the same group.** Create a project in A, then open it from B with empty recents. Confirm B opens its initialized workspace on the first click. Reopen in B and verify that its saved record is reused and A’s data is intact. Check simultaneous first opens, a read-only grant and a failed dashboard read. Both extensions should list one shared project with the original ID. An unlinked group must have no access.
## 20.3 Capability and root discovery ## 20.3 Capability and root discovery
An extension using dashboard-backed project files must: An extension using dashboard-backed project files must: