Skip to content

Add author DMs, resolve, filters, and delete to the microblog - #98

Closed
Ssundar941 wants to merge 1 commit into
mainfrom
feature/microblog-dms-resolve-filters
Closed

Ssundar941 wants to merge 1 commit into
mainfrom
feature/microblog-dms-resolve-filters

Conversation

@Ssundar941

Copy link
Copy Markdown
Collaborator

What this adds to the microblog

Page-author DMs

  • Pages can list their authors' login uids in front matter: authors: [uid1, uid2].
  • A new post or reply DMs each author (1:1, from the poster's own account) through the Spring DM API (/api/person/uid/{uid} → /api/dm/conversations). The poster is never DM'd about their own post.
  • Each author can turn these DMs off per page with a "DM me about new posts and replies on this page" checkbox in the panel (shown only to that page's authors). Every DM ends with a line explaining how to turn them off.
  • If the sender isn't signed in to Spring, the post still saves and the panel says the authors weren't messaged.

Resolve / Reopen

  • A post's writer and the page's authors can mark a post resolved or reopen it. Resolved posts get a small RESOLVED badge.

Filters

  • Active (default) hides resolved posts, History shows only resolved posts, Mine shows your own posts.

Delete + layout

  • Your own posts (or any post, for an Admin) get a trash button; Edit is now also only shown where the server allows it.
  • Reply / Edit / Delete are matching square icon buttons with Resolve/Reopen at the right end of one row that never wraps (Resolve becomes an icon square on phones).

How it works (no backend change)

  • The Flask API only lets a post's writer or an Admin edit a post, so resolve status is saved as a hidden marker reply ([[microblog:resolved]] <uid>), and the DM opt-out as a hidden marker post ([[microblog:dm-off]]). The panel never shows either.
  • The DM opt-out is trusted via the server-stamped userUid on posts. A page author's resolve marker is not server-verified, so a crafted request could hide a post from Active; it would still appear under History.

Files

  • _includes/microblog_foundation.html: filters, DM setting, resolve/delete buttons, author DMs
  • assets/js/api/microblog.js: resolve markers, DM opt-out, delete, current user
  • assets/js/api/microblog-notify.js (new): sends the page-author DMs
  • _sass/open-coding/microblog.scss: all new styles
  • _posts/CSP/flask/api/2025-11-08-microblog-playground.md: docs for authors: and the opt-out

Testing

  • Checked in a local harness running the real include/JS against mocked Flask and Spring APIs: filters, resolve/reopen permissions, DMs (including skipping opted-out authors and the sender), the opt-out toggle, delete, and button-row layout for every viewer at desktop and 375px widths.
  • Not yet verified: a real Jekyll/Sass build (no Ruby/Node on the dev machine) or the live Flask/Spring servers.
  • No capstone page has authors: yet, so no DMs will go out until teams add their uids.

🤖 Generated with Claude Code

Pages can list author uids in front matter (`authors:`). A new post or
reply DMs each author through the Spring DM API, and each author can turn
those DMs off per page with a checkbox in the panel; the DM says how.

Posts can be marked resolved (or reopened) by their writer or a page
author. Resolved posts drop out of the default Active view and show under
History; Mine shows your own posts. Your own posts also get a delete
button, and the post actions sit on one row that never wraps.

No Flask change: resolve status is a marker reply and the DM opt-out is a
marker post, both hidden from the panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Ssundar941 Ssundar941 closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant