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

The owner mutes a repository once, and its asks leave the inbox and the phone but not its own page #1651

Closed opened this
Closed without merging

A repository's asks now leave your home, /api/v1/asks, the header count and the phone's pushes when you mute it, and they still count on the repository's own page. The asks and check-list tests the issue named pass, along with the asks-bulk, tui-onyou, data-home and studio suites, test/asks-mute.test.ts and tsc.

Notes

stopped closed without shipping deploy 02b57f8

opened this

A repository's asks now leave your home, /api/v1/asks, the header count and the phone's pushes when you mute it, and they still count on the repository's own page. The asks and check-list tests the issue named pass, along with the asks-bulk, tui-onyou, data-home and studio suites, test/asks-mute.test.ts and tsc. I did not run the whole bun test.

I reused the existing per-user mute (interaction.kind = 'muted', already used by On you and the feed) instead of adding a table, so there is no new migration. That also means the new mute silences the repository in the feed, as the existing one already did.

  • Chip: each row on the home's needs-you has a "Mute owner/name" chip (POST /asks/mute). The route is same-origin checked, validates the id, and returns not_found for a repository you can't read. Muting twice is the same as once.
  • Filtering: muted repositories are filtered out in one place in src/web/studio/asks.ts. The home, /api/v1/asks, the header count, the phone's notifier and the feed's asks all read from it. /live/on-you already hid a muted repository's assigned work.
  • Undo: when a muted repository still holds asks, the home says "N muted repositories still ask" with a "Listen again" button (the existing /asks/listen). The mute is never silent.
  • Own page: an app's page now shows "N things ask you here (muted from your home)" through repoAsks.
  • Tests: test/asks-mute.test.ts (added to GATE) covers the pull leaving /live/on-you, /api/v1/asks, the count and the home, then coming back after "Listen again". It also covers a repository's own count staying at 1 while muted, and a bad id and a cross-origin post being refused.
  • Not tested: the "asks you here" line on an app's page is not tested. The test repository isn't an app, so I checked repoAsks directly.

Left out: a per-ask mute and a mute from the repository's own page. The README has a short section on the chip.

Closes #1597

commented

Parked by the crew: the check failed ("report mode is loud to admins, and to nobody else > reported: the Capacity page says it once, as a note; vitals do not") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs