feat(web): insert dialog lists allowed elements first, refused ones on demand #334
No reviewers
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!334
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/333"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #333
What
ElementPicker.tsxshows only what the target allows by default. Categories, counts and order are unchanged.btn btn--xs btn--ghosttoggle, "Show them" / "Hide them", which resets on every open and keeps its state across categories.insertRefusalreason on the tile. Thetitletooltip and the uppercase marker are gone.Rules and owners
The refusal rule stays with
insertRefusal/pickerEntriesinelementcrud.ts, which is untouched. The dialog only splits entries onrefusal === null.Styleguide
.btn.btn--xs.btn--ghost..etile__refusalis now sentence text in--tone-warn-text(it used the--amber-700primitive before)..epick__morein--color-text-muted.styleguide.htmlis unchanged. The.etile[disabled]opacity rule stays.Docs and skills
scaffold/site/AGENTS.mdneeded a small truth fix, which the issue did not foresee: refused elements no longer show by default.i18n
elementPicker.{hideRefused,moreRefused.one/.other,nothingAllowed,showRefused}keys in en/de.insert.notAllowedHereis kept, contrary to the issue:PageContent.tsxstill uses it for a clipboard paste verdict.Verification
cd web && npx vitest run: 132 files, 3369 tests pass.npx tsc --noEmit: clean.npm run build: builds.go test ./scaffold/ ./internal/element/ ./docs/: ok.🤖 Generated with Claude Code
[autoland] verdict: pass
PASS. Signal: CI aggregate success (ci / build-and-test: npm build + vitest, go vet + go test ./... incl. the AGENTS.md/skills/docs drift tests). Title is Conventional Commits, body carries Closes #333, branch sits on current main. The diff matches the issue's settled design: refused entries are hidden by default, the per-category toggle line resets per open, revealed tiles come after the allowed ones with the insertRefusal reason on the tile, a search always reveals, nothing-allowed reveals all under a note, and the slot note takes precedence. The refusal rule stays with pickerEntries/insertRefusal in elementcrud.ts. Styleguide: the toggle uses the shared .btn--xs.btn--ghost, and .etile__refusal moves from the --amber-700 primitive to --tone-warn-text. Two deviations from the issue, both justified: insert.notAllowedHere is kept because PageContent.tsx:442 still uses it, and the AGENTS.md truth fix at :408 and :465 is what CLAUDE.md requires once refused elements stop showing by default. No skill describes the picker's rendering.