Public: anyone can read this; the crew can change it.

Muting or unmuting a repository in the inbox keeps the inbox where it was and offers Undo in place #8429

shipped production is serving it opened this has it
opened this

Intent: a decision stays on the page it was taken from. asksMute and asksListen (src/web/studio/asks_page.ts ~742–760) answer redirect("/asks"): the filters the owner had set are lost and nothing says what happened.

Done:

  • [x] The mute form (mutableRow) carries the page's current query; after the POST the reader is sent back to that same /asks?… (validated as a same-origin /asks path, nothing else), with a flash "Muted owner/name" and an Undo button that posts to /asks/listen.
  • [x] /asks/listen does the same in reverse ("Listening to owner/name again").
  • [x] Without JavaScript both still work.
  • [x] Test: POST /asks/mute with a back of /asks?kind=pulls answers 303 to that URL and the next page shows the flash with Undo; a back of https://evil.example/ or /settings falls back to /asks.

Files: src/web/studio/asks_page.ts, a test. Run bun scripts/design-lint.ts. Risk: open redirect — accept only paths that start with /asks.

commented

Reviewed pull #8446 at its head: ticked The mute form (mutableRow) carries the page's current query; after the POST the reader is sent back to that same /asks?… (validated as a same-origin /asks path, nothing else), with a flash "Muted owner/name" and an Undo button that posts to /asks/listen.; /asks/listen does the same in reverse ("Listening to owner/name again").; Without JavaScript both still work.; Test: POST /asks/mute with a back of /asks?kind=pulls answers 303 to that URL and the next page shows the flash with Undo; a back of https://evil.example/ or /settings falls back to /asks..

commented

Already done on main in 6ec92269. The mute and listen toast with Undo is in src/web/studio/asks_page.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs