Repository navigation
feat(web): pair page and device list - #235
Merged
Merged
Conversation
Add /pair, where a signed-in person types the code that a device shows, sees what the device has, and approves or denies it. Add Menu > Settings > Devices with Remove. Closes #229
- Poll for the existing rise and needle thresholds for up to five seconds. - Keep the fullscreen view and its audio fixture unchanged.
- Restore the original setup and pixel assertions for both specs.
- Keep the device client off the fullscreen listener startup path. - Keep the original waveform checks and thresholds.
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.
Closes #229
Slice S6 of the any-device listener wave: the web pages where a person pairs a hardware listener and sees the devices they have.
What changes
/pair(web-app/src/pages/pair/index.tsx, lazy route inmain.tsx): a signed-in person types the 8-digit code (?code=fills it), sees the device name and what it has, and approves or denies it. A signed-out visitor getsSign in to pair, which returns to/pair?code=…through/auth/login?return_to=.Paired; Deny showsNot paired. A 404 shows one inline error. The server's 403 lockout (A3) shows the lock message; the page keeps no count. An expired code during approval goes back to code entry with the reason.web-app/src/lib/devices.ts: browser client ofDevicesApi, derived from the contract likelib/capture/client.ts. Each failure settles to a named refusal (signed_out,not_found,locked,failed).DevicesSection.tsx, signed in only): name, status and last use per device. Remove asks once (window.confirm, as Access tokens does), then the row showsrevoked.Before and after
/pair1440x900/pair390x844The fullscreen listening view does not change.
Files outside the slice list
web-app/e2e/listen-fake.ts(+2 lines):serveListeninganswersGET /api/v1/deviceswith no devices. Without it, Settings in the existing listening specs shows a "Devices could not be read" alert, andlisten-signin.spec.ts"a failed sign out" fails on two alerts.changelog.d/229.added.md: the required fragment.Verification (local, this host)
web-app/e2e/pair.spec.ts: 6 passed, against a routedDevicesApifake (S1 is not merged yet).button-style.spec.tsandlisten-signin.spec.tswith this change: all passed. Under host load,button-style"every Menu section" (WorkOS Members) andlisten-signin"outside the workspace team" failed once each, then passed alone.web-app/tests/devices-client.test.ts: 4 passed (code input, refusal mapping on a real HTTP server, CSRF header on revoke).npm run check,npm run build -w web-app,npm run quality:fallow -- --base HEAD,npm run quality:sentrux: pass.npm run check:app(whole e2e suite and day replay), because the host is under heavy load and the rules limit runs to this slice's tests. No live server: S1 is not merged.Review keeps
mapRequestinlib/devices.tsrepeats 4 lines oflib/capture/client.ts. Kept: a shared helper would touch the capture slice, which this slice does not own.