From 628dcb814ece6335667e2b719049728aa161d8c9 Mon Sep 17 00:00:00 2001 From: grm Date: Tue, 15 Sep 2026 23:17:17 +0300 Subject: Make the post form's tag input a box with a folded list of chips A checkbox per existing tag stops working once a blog has dozens of them. The form is now one comma-separated box, prefilled with the post's tags, and the blog's tags sit folded under it as chips; a small script toggles a clicked chip in the box, and without it the chips are a plain list to copy from. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- AGENTS.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index 974fc10..18bc043 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -278,10 +278,12 @@ internal/web/ server.go (host router, middleware, render helpers) the URL (`/tag/`, `handleBlogTag`, published posts of every page, paginated) and the dedupe key — "Go" and "go" are one tag, the first spelling wins. `Post.Tags` rides along in `postCols` as two arrays. - The post form offers the blog's existing tags as checkboxes (`tag`) plus - a comma-separated `new_tags` box; `parseTags` normalises both into one - list (20 per post, 40 runes each; nothing slug-worthy → dropped) and - `SetPostTags` stores it after the post is saved. Tags no post carries + The post form is one comma-separated `tags` box (prefilled by + `tagsText`); the blog's existing tags sit folded under it as chips that + a small inline script toggles in the box (a plain list without JS). + `parseTags` normalises the box (20 per post, 40 runes each; nothing + slug-worthy → dropped) and `SetPostTags` stores it after the post is + saved. Tags no post carries are deleted (`deleteOrphanTags`, also after post/page deletion), so the form only lists tags in use. `TagCounts` counts published posts only: a tag on hidden posts alone shows nowhere public and its page is a 404. -- cgit v1.2.3