Suggest subreddits when filling in an inventory entry, checked with Reddit
If the Subreddits box is empty, the AI suggests up to eight, by the relationship, each with who is there. Each is looked up on Reddit (with the app's client ID and secret) and left out if it doesn't exist, is private, 18+, restricted or archived; the first five kept fill the box. The form lists every suggestion with members, post types and why any was left out. Lookups are cached for drafting. Without Reddit keys the suggestions are kept and the form says they weren't checked. The Reddit client now returns ErrNotFound and ErrForbidden, and treats an empty about listing as not found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -349,3 +349,12 @@ form.inline { display: inline-block; margin: 0 0 0.75rem; }
|
||||
.results .detail { display: block; color: hsl(var(--muted-foreground)); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.search-page { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; max-width: 40rem; }
|
||||
.search-page input { margin: 0; }
|
||||
|
||||
/* Subreddits suggested when filling in an inventory entry */
|
||||
.suggestions { margin-top: 0.75rem; font-size: 0.92rem; }
|
||||
.suggestions summary { cursor: pointer; font-weight: 600; }
|
||||
.suggestions ul { list-style: none; padding: 0; margin: 0.5rem 0; }
|
||||
.suggestions li { padding: 0.35rem 0; border-bottom: 1px solid hsl(var(--border)); display: flex; flex-wrap: wrap; gap: 0 0.6rem; align-items: baseline; }
|
||||
.suggestions li:last-child { border-bottom: 0; }
|
||||
.suggestions li .help { flex-basis: 100%; margin: 0; }
|
||||
.suggestions li.dropped a { text-decoration: line-through; color: hsl(var(--muted-foreground)); }
|
||||
|
||||
Reference in New Issue
Block a user