feat: tags with approval modes and bulk actions #5

Merged
KofTwentyTwo merged 1 commits from feature/tags into develop 2026-10-13 22:40:51 +00:00
KofTwentyTwo commented 2026-10-13 22:03:34 +00:00 (Migrated from github.com)

Summary

Phase (d), qbit side, of QRun-IO/qqq#1136 (spec §4 rows 6 and 7, §6.2): tags.

Tables:

  • collaboration_tag ("Tags", in the nav, audited, in Quick Search by label);
  • collaboration_record_tag (a child list on the tag), restricted by parent table READ like the other extension tables.
  • A collaboration_tag possible value source.

Modes: each table is FREE or APPROVED_ONLY, set in feature settings (TAGS, mode) with defaultTagMode as the fallback.

  • In FREE, anyone with <table>.tag or table EDIT can create tags.
  • In APPROVED_ONLY, a new label becomes a suggestion, unless the user has collaboration.tags.manage.
  • Global tags need collaboration.tags.manage.
  • Unapproved tags can never be applied.

TagsService:

  • vocabulary lists global and table tags, plus my own suggestions, ordered by usage;
  • create normalizes names (trimmed, lowercase, single spaces, at most 60 characters);
  • tagsFor;
  • apply is idempotent, keeps usageCount up to date, and writes TAGGED/UNTAGGED activity. Followers are not notified.

Actions (streamed ETL Review/Result):

  • Approve tags, Merge tags (moves record tags, de-duplicates, sets mergedIntoTagId) and Delete tags;
  • bulk Add tags and Remove tags on host tables listed in tagActionTables.

Also:

  • Parent cleanup removes record tags.
  • The home has a Tags card: vocabulary size, pending suggestions, top 5 tags.

Filter and quick search: TagFilterTranslator handles IN (any), CONTAINS_ALL (all), NOT_IN and the blank checks over record tags, capped at 10,000 records. It will be wrapped in core's VirtualFieldCriteriaExpanderInterface (QRun-IO/qqq#1140) once that is released.

Note: the bulk actions declare a multi-select tags input. RC.5 has no native multi-value form field, so Next UI needs to render that contract; it will be covered in the Next tags PR.

Test plan

  • ./mvnw -o verify: 68 tests, 97.0% instruction and 100% class coverage, checkstyle clean.
  • CircleCI test_only.

🤖 Generated with Claude Code

## Summary Phase (d), qbit side, of QRun-IO/qqq#1136 (spec §4 rows 6 and 7, §6.2): tags. **Tables:** - `collaboration_tag` ("Tags", in the nav, audited, in Quick Search by label); - `collaboration_record_tag` (a child list on the tag), restricted by parent table READ like the other extension tables. - A `collaboration_tag` possible value source. **Modes:** each table is FREE or APPROVED_ONLY, set in feature settings (TAGS, `mode`) with `defaultTagMode` as the fallback. - In FREE, anyone with `<table>.tag` or table EDIT can create tags. - In APPROVED_ONLY, a new label becomes a suggestion, unless the user has `collaboration.tags.manage`. - Global tags need `collaboration.tags.manage`. - Unapproved tags can never be applied. **`TagsService`:** - `vocabulary` lists global and table tags, plus my own suggestions, ordered by usage; - `create` normalizes names (trimmed, lowercase, single spaces, at most 60 characters); - `tagsFor`; - `apply` is idempotent, keeps `usageCount` up to date, and writes TAGGED/UNTAGGED activity. Followers are not notified. **Actions** (streamed ETL Review/Result): - **Approve tags**, **Merge tags** (moves record tags, de-duplicates, sets `mergedIntoTagId`) and **Delete tags**; - bulk **Add tags** and **Remove tags** on host tables listed in `tagActionTables`. **Also:** - Parent cleanup removes record tags. - The home has a Tags card: vocabulary size, pending suggestions, top 5 tags. **Filter and quick search:** `TagFilterTranslator` handles IN (any), CONTAINS_ALL (all), NOT_IN and the blank checks over record tags, capped at 10,000 records. It will be wrapped in core's `VirtualFieldCriteriaExpanderInterface` (QRun-IO/qqq#1140) once that is released. **Note:** the bulk actions declare a multi-select tags input. RC.5 has no native multi-value form field, so Next UI needs to render that contract; it will be covered in the Next tags PR. ## Test plan - [x] `./mvnw -o verify`: 68 tests, 97.0% instruction and 100% class coverage, checkstyle clean. - [ ] CircleCI `test_only`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.