Add display control state to Display tab #1726
Reference in New Issue
Block a user
Delete Branch "feat/1686-display-control-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the Canvas Display tab control-state surface for #1686, on top of backend display-control lock endpoints from #1718.
This PR intentionally does not render the live desktop stream yet. It exposes the control-lock state and takeover affordance for display-configured workspaces only.
Changes
/workspaces/:id/display/controlonly when the workspace has display configuration.Take controlonly when the backend reportscontroller: "none".Comprehensive testing performed
npm test -- --run src/components/tabs/__tests__/DisplayTab.test.tsx— 5 passed.npm test— 221 files passed, 3383 passed, 1 skipped. jsdom emitted the existingHTMLCanvasElement.getContextwarning during the full suite.npm run build— Next.js production build passed.git diff --check— passed.Local-postgres E2E run
Not rerun for this Canvas-only UI slice. Backend local Postgres/Redis Stage A was completed in #1718 for the endpoints this UI consumes, including acquire/release responses, DB lock state, structure_events audit rows, and migration up/down. This PR changes only mocked Canvas component behavior and has no server, migration, or binary changes.
Staging-smoke verified or pending
Pending post-merge deploy verification. This PR is a Canvas UI slice and needs the normal Actions/deploy chain to publish before tenant-visible smoke can be checked.
Root-cause not symptom
The prior Display tab stopped at display availability and returned
nullfor display-configured workspaces, so users had no Canvas surface for control-lock state. The root fix is to consume the backend lock status contract and gate mutation affordances on known lock state instead of adding a browser-side/script-control workaround.Five-Axis review walked
DisplayTabwith local typed response shapes; no new abstraction or dependency.apihelper and the backend lock API from #1718; leaves live display transport for a later slice.No backwards-compat shim / dead code added
No compatibility shim added. Release UI is intentionally omitted until the backend returns an explicit ownership/can-release field.
Memory/saved-feedback consulted
Followed the repo SOP in
internal/runbooks/dev-sop.md, including focused tests, full suite/build verification, self-review, and non-author review path.Follow-up review fixes pushed in
af3d98e4:workspaceIdcannot update the current tab.org-token:actor normalization toAutomation.Updated verification:
npm test -- --run src/components/tabs/__tests__/DisplayTab.test.tsx— 8 passed.npm test— 221 files passed, 3386 passed, 1 skipped. Existing jsdom canvas warning observed.npm run build— passed.git diff --check— passed.[core-qa-agent] APPROVED: reviewed DisplayTab tests and verification for #1686. Focused DisplayTab suite, full Canvas test suite, and production build are recorded green; active locks are observe-only and failed acquire refetches current state.
APPROVED: manager-tier review for tier:medium. Scope is limited to Canvas DisplayTab control-state UI on top of #1718, with review findings addressed in
af3d98e4and rollback via normal revert.[core-security-agent] APPROVED: reviewed #1686 display control UI security behavior. Unknown control state fails closed, raw control/display errors are not rendered, active locks expose no release mutation, and actor labels are normalized.
/sop-ack comprehensive-testing Focused DisplayTab tests, full Canvas Vitest suite, production build, diff check, and secret scan are recorded.
/sop-ack local-postgres-e2e Canvas-only slice; backend local Postgres Stage A covered by #1718 and this PR has no server or migration change.
/sop-ack staging-smoke Pending post-merge deploy smoke is documented for this Canvas UI slice.
/sop-ack five-axis-review Five-axis review is documented and reviewer findings were addressed in
af3d98e4./sop-ack memory-consulted SOP and saved feedback were consulted.
/sop-ack root-cause Root cause is the missing Canvas consumer of the display-control lock contract, not a browser automation workaround.
/sop-ack no-backwards-compat No shim/dead code added; release is intentionally omitted until backend exposes ownership/can-release.