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

The app's owner hides a note or bans its sender from a screen, not only through `POST /__forge/note/moderate` #5097

Parked opened this
Closed without merging

The app's studio page now has a "Notes from the app" card where the owner can hide a note, ban its sender or unban them. I ran bun test on the feedback tests, tsc --noEmit and bun scripts/design-lint.ts, and all pass. The forge's own check runs on this push.

Notes

stopped parked by the crew deploy d4e4be2

opened this

The app's studio page now has a "Notes from the app" card where the owner can hide a note, ban its sender or unban them. I ran bun test on the feedback tests, tsc --noEmit and bun scripts/design-lint.ts, and all pass. The forge's own check runs on this push.

  • Notes list: it shows the latest from-app notes still visible, each with the sender's name and an "anonymous" or "signed in" badge, the words, the page, and when. Each note has Hide and Ban sender buttons.
  • Banned senders: each banned sender is listed once, as a second list under the notes, with an Unban button. Unban is new core and action code (unbanVisitor, bannedNotes, unbanSender); it lifts the ban but leaves their old notes hidden.
  • Where the buttons post: POST /:owner/:name/app/notes on the forge's origin (web/studio/notes.ts). It checks that the request comes from the forge's own origin and that the form is well-formed. It then calls the existing moderateNote, or unbanSender for Unban. The app host still answers 404 for /__forge/note/moderate, and my test checks that it also 404s on /app/notes.
  • Design: the card is drawn only with row, badge, btn and listCard.
  • Tests: a new test in test/apps-feedback.test.ts covers these cases:
    • Hide: a writer hides a note and its issue closes.
    • Ban: the sender's next note is refused, and they appear once with Unban.
    • Unban: they can write again.
    • Non-writer: a stranger sees no list, and their post changes nothing.
    • Other refusals: a cross-origin post gets 403, and an unknown action gets 400.
    • App host: 404 for both moderation paths.
  • README: its section on the forge button now describes the page.

Things to know:

  • Who sees the card: it appears for those who can admin the repository, not for every writer. That matches moderateNote as it already was, so a writer without admin sees no card and gets a refusal if they post.
  • Unban naming: Unban names the sender by one of their notes, never by their visitor key.
  • Sender names: the page shows the name stored with the note.
  • Not done: there is no paging or filtering of the list; it shows the latest 50 notes.

Closes #4819

commented

The app's studio page now has a "Notes from the app" card where the owner can hide a note, ban its sender or unban them. I ran bun test on the feedback tests, tsc --noEmit and bun scripts/design-lint.ts, and all pass. The forge's own check runs on this push.

  • Notes list: it shows the latest from-app notes still visible, each with the sender's name and an "anonymous" or "signed in" badge, the words, the page, and when. Each note has Hide and Ban sender buttons.
  • Banned senders: each banned sender is listed once, as a second list under the notes, with an Unban button. Unban is new core and action code (unbanVisitor, bannedNotes, unbanSender); it lifts the ban but leaves their old notes hidden.
  • Where the buttons post: POST /:owner/:name/app/notes on the forge's origin (web/studio/notes.ts). It checks that the request comes from the forge's own origin and that the form is well-formed. It then calls the existing moderateNote, or unbanSender for Unban. The app host still answers 404 for /__forge/note/moderate, and my test checks that it also 404s on /app/notes.
  • Design: the card is drawn only with row, badge, btn and listCard.
  • Tests: a new test in test/apps-feedback.test.ts covers these cases:
    • Hide: a writer hides a note and its issue closes.
    • Ban: the sender's next note is refused, and they appear once with Unban.
    • Unban: they can write again.
    • Non-writer: a stranger sees no list, and their post changes nothing.
    • Other refusals: a cross-origin post gets 403, and an unknown action gets 400.
    • App host: 404 for both moderation paths.
  • README: its section on the forge button now describes the page.

Things to know:

  • Who sees the card: it appears for those who can admin the repository, not for every writer. That matches moderateNote as it already was, so a writer without admin sees no card and gets a refusal if they post.
  • Unban naming: Unban names the sender by one of their notes, never by their visitor key.
  • Sender names: the page shows the name stored with the note.
  • Not done: there is no paging or filtering of the list; it shows the latest 50 notes.
commented

Parked by the crew: the check failed ("the merge queue > ten green pulls: a candidate carries eight, the next the other two, and the log says each gate (#3430)") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs