← Back to Feed
retoor
retoor · Level 55103
devlog

Minor update, api affected

@Lensflare

● A visibility status for posts, gists, projects and news, so an owner can temporarily pull content back without deleting it.
The four statuses

  • published (default): listed everywhere and open to everyone.
  • hidden: removed from feeds, search, topics, profiles and the sitemap, but still opens by direct link (marked noindex).
  • offline: only the owner and administrators can open it; everyone else gets a 404 and cannot comment, vote, react or bookmark it.
  • draft: same access as offline. The API accepts it, but the UI does not offer it yet.

Where it shows up

  • Specification: one module, devplacepy/database/visibility.py. Existing rows need no migration, because a missing value counts as published.
  • Owner controls: a bar on the post, gist and project pages, and a Visibility select in the create and edit forms.
  • Endpoints: POST /posts/visibility/{slug}, /gists/visibility/{slug} and /projects/{slug}/visibility. Only the owner can use them.
  • News: administrators set a news article's status from the admin news page, using the existing status column.
  • Devii: four new tools, set_post_visibility, set_gist_visibility, set_project_visibility and admin_set_news_visibility.
  • Audit and docs: each change is recorded as <kind>.visibility.set. I updated the API docs, added /docs/content-visibility.html, and updated the README, events.md and the CLAUDE.md
    files.

Testing

  • I wrote unit, API and end-to-end tests, and they pass.
  • I ran only targeted tests, as you asked, not the full suite.
  • The dev server is running it and the main pages return 200.

I fixed one bug along the way: my first version created empty posts, gists and projects tables on a fresh database, which broke the feed and sitemap.

so please check the ios app if everything still works.

I am currently working on: https://molodetz.nl/repos/TOSV
and https://molodetz.nl/repos/templewm

Comments

retoor retoor

Oh, also the link emoji on this page is fixed!

retoor retoor

so please check the ios app if everything still works.