Repository navigation
Closed
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Connect to another environment using a pairing link with the old permissions.
- Leave its permission update notice open.
- Open Settings → Connections.
- Choose Remove from this device from the connection's actions menu.
- Confirm the removal.
Expected behavior
The permission update notice disappears with the connection.
Actual behavior
The notice still asks you to pair the removed connection again.
Impact
Minor bug or occasional failure. Anyone who removes a connection while its permission update notice is open has to dismiss the stale notice separately.
Version or commit
main at c4dc9ed55b. The cause is at apps/web/src/components/PermissionUpdateNotice.ts:76.
Environment
Linux x64 boat.dev default machine, a fresh checkout.
Logs or stack traces
Expected "Permissions have changed for Scenario" to be hidden, but it is visible.Automated repro
Fails in 2 of 2 runs on main: apply the patch with git apply, then run the command.
diff --git a/scripts/scenarios/removing-environment-clears-permission-notice.e2e.ts b/scripts/scenarios/removing-environment-clears-permission-notice.e2e.ts
new file mode 100644
index 0000000000..29d468195c
--- /dev/null
+++ b/scripts/scenarios/removing-environment-clears-permission-notice.e2e.ts
@@ -0,0 +1,46 @@
+import { expect } from "e2e";
+import * as Schema from "effect/Schema";
+
+import { SECOND_HOME, startSecondServer } from "./second-server.ts";
+import { makeState, runPromise, test, WEB } from "./t3.ts";
+
+const decodePairing = Schema.decodeEffect(
+ Schema.fromJsonString(Schema.Struct({ credential: Schema.String })),
+);
+
+test(
+ "Removing a connection clears its permission update notice",
+ WEB,
+ async ({ t3, app, screen }) => {
+ await t3.project("demo");
+ const server = startSecondServer(app.baseUrl ?? "");
+ try {
+ const { host } = await server.ready;
+ const { cli } = makeState(SECOND_HOME);
+ const issued = await runPromise(
+ cli(["auth", "pairing", "create", "--scope", "orchestration:read", "--json"]),
+ );
+ const { credential } = await runPromise(decodePairing(issued.stdout));
+
+ await t3.open("/settings/connections");
+ await screen.getByRole("button", "Add environment").tap();
+ const dialog = screen.getByRole("dialog");
+ await dialog.getByPlaceholder("backend.example.com").fill(host);
+ await dialog.getByPlaceholder("PAIRCODE").fill(credential);
+ await dialog.getByRole("button", "Add environment").tap();
+
+ const notice = screen.getByText("Permissions have changed for Scenario", { exact: true });
+ await notice.waitFor({ timeout: 60_000 });
+ const actions = screen.getByRole("button", "More actions for Scenario");
+ await actions.press("Enter");
+ await screen.getByRole("menuitem", "Remove from this device…").press("Enter");
+ await screen.getByRole("button", "Confirm").press("Enter");
+ await actions.waitFor({ state: "hidden" });
+
+ await app.screenshot("after-removing-connection");
+ await expect(notice).toBeHidden();
+ } finally {
+ await server.stop();
+ }
+ },
+);pnpm scenarios:prove scripts/scenarios/removing-environment-clears-permission-notice.e2e.ts --base mainWorkaround
No response
Metadata
Metadata
Assignees
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.


Activity