Require .isap extensions to initialize missing project data
This commit is contained in:
@@ -63,6 +63,21 @@ foreign key in its own canonical files.
|
||||
In both models, project contents live below the extension's authoritative group
|
||||
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
|
||||
|
||||
An extension using dashboard-backed project files must:
|
||||
|
||||
Reference in New Issue
Block a user