Repository navigation
Conversation
The trust prompt of /load and the error views of /load and /project/[id] replaced the live progress block without moving focus, so focus fell to the page body and nothing was read out. The title now takes focus each time an error is shown, with the hint as its description. Closes #261
The dialog closed before the request while its trigger was disabled, so focus fell to the page body and a failure showed behind the page. It now stays open until the project is made, with the progress and the error inside it and the entries kept. Closes #316
Escape, Cancel and the close button no longer close the dialog while the project is made, and closing it clears its error. The loading screen's error detail is part of the title's description instead of a second alert.
…st prompt /load?path= now checks the folder with a new projects.locate RPC before asking to trust it. locate runs the same hosted, root folder and stat checks as open, through the same code, and opens nothing: a missing folder or one outside the root folder gets its error at once. Closes #318
…ther The load page runs projects.locate and the recent projects check at once. A registry test pins that a hosted editor refuses locate before it looks at the folder: one refusal for an existing, a missing and an outside folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Closes #318
Stacked on fix/load-page-trust (#367): merge that one first. Until it merges, this PR also shows its three commits (788b337, 5de0b8c, acfcbe1). This PR's own commits are 36ef7bd and f80f2f6.
/load?path=<folder>used to ask to trust a folder before saying it does not exist. It now checks the folder with a newprojects.locateRPC first.locateruns the same hosted, root folder and directory checks asopen, through one shared private method (_localFolder), and opens nothing, runs no project code and returns no path.packages/protocol:projects.locate: { input: { path }, output: null }, with TSDoc.packages/server-core:ProjectRegistry.locateand its handler;_openLocalkeeps its checks, codes and messages word for word.packages/project:ProjectService.locate(path)(a new public method; the SDK exports only its token).apps/editor: the/loadpage callslocateand the recent projects check together, then shows the prompt or opens the project.Behaviour change: a folder outside the root folder also gets its error right away, without the prompt. On a hosted editor the page is unchanged (it still refuses path links before any RPC).
How do you test this PR?
pnpm build):load-page.spec.ts"a missing folder says so without asking to trust it" andworkbench.spec.ts:172"opens a project from a link" fail: the trust prompt shows instead of "No project folder at missing-folder". 2 failed, 4 passed.load-page.spec trust.spec workbench.spec --retries 0: 17 passed, 0 failed, 0 skipped (on 36ef7bd and again on f80f2f6).trust.spec.ts:locatefinds a trusted folder without running its config, gives NOT_FOUND for a missing folder or a file, FORBIDDEN outside the root folder, and one refusal for any path on a hosted editor;project-registry.spec.ts: a hosted registry refuseslocatebefore it looks at the folder. Moving the hosted check after the folder lookup makes it fail with three different answers.projects.openon a real folder, since a missing folder no longer goes through the prompt.AGENTS.mdtells e2e authors to open such folders with/load?path=directly.pnpm buildpnpm lintpnpm typechecknpx vitest runload-page.spec trust.spec workbench.spec, Chromium,--retries 0CHROME=… pnpm test(on 36ef7bd)editor-native.spec.ts, no.examples/)Integration: a scratch branch with every editor branch of this sweep merged (f80f2f6 included) passed
pnpm build, lint, typecheck,pnpm test --force(1014 passed, 1 skipped) and the full e2e suite with the engine (141/141, Chromium only).Merge danger
maindeploys the editor app.apps/editor/e2e/load-page.spec.ts, which that branch creates. If fix(editor): focus the loading screen errors and keep the new project dialog open #367 is squash-merged, rebase this branch onmainbefore merging.packages/server-core/test/project/project-registry.spec.tsis also created, on their own, by fix/server-plugins-deactivate and fix/server-core-fs-safety. Whoever merges second or third must fold the tests together: one top-level setup, and the later suites inside their owndescribe(this branch's suite isdescribe('ProjectRegistry.locate')with its own root and registry variables). The integration branch did this and the file passed 12/12.Follow-up issues
None.
Quality gate
Small gate: one reviewer covering every lane, plus the security reviewer.
AGENTS.mde2e note and the TSDoc updated; no user docs change neededlocateand the recent check together, fixed in f80f2f6)Last round f80f2f6 (
Promise.all, the hosted registry test): producer red→green (order check) and the commands above, not re-reviewed.