Skip to content

Web Cloud Files: tag chips on file rows - #88

Merged
ehsan6sha merged 1 commit into
mainfrom
feat/cloud-files-tag-chips
Jun 23, 2026
Merged

Web Cloud Files: tag chips on file rows#88
ehsan6sha merged 1 commit into
mainfrom
feat/cloud-files-tag-chips

Conversation

@ehsan6sha

Copy link
Copy Markdown
Member

What

File rows in the web Cloud Files manager now show the same compact tag chips the category tabs already show — closing the round-3 gap (the Tags action shipped in #81, but chips on rows did not). v1.11.4.19.

How

  • New _fileTags state + best-effort _refreshTags(bucket, objects) (mirror of WebBucketScreen._refreshTags) — wrapped in try/catch so a tag-manifest failure never blocks or fails the listing.
  • Indexed over the whole flat bucket (the listObjects result), not the current folder, so drilling into subfolders shows chips with no reload_enterFolder only changes the prefix. Rows look up _fileTags[o.key].
  • Refreshed after each listing (including the silent upload-complete reload) and after a tag edit.
  • _fileTags cleared on bucket switch (_openBucket/_toBuckets) so a stale chip can't flash against a coincidentally same-named key before the async refresh returns.
  • Chips rendered in the row subtitle (Column: size + _TagChipRow), only when non-empty.
  • _TagChipRow duplicated from WebBucketScreen (copy Windows #2; shared-widget extraction deferred to a 3rd consumer, per project rule-of-three — and editing the working category-tabs screen would expand the can't-runtime-verify blast radius).

No SDK or shared-service changes — WebTagService.tagsForObjects / _bareKey matching is untouched, so chips are computed identically to (and stay consistent with) the already-shipped Tags action.

Verification

  • flutter analyze (changed files): clean.
  • flutter build web --release: green.
  • Advisor-reviewed (built-in advisor + cursor; agy unavailable this run — not authed for headless). Confirmed: whole-bucket indexing for folder nav (cursor's critical catch), clear-on-switch, duplicate-not-extract, leave _bareKey alone.

Live-verify gate (web-only; not signed-in-testable here)

  • Tag a file inside a folder, reload → chip shows. This is the discriminating check: root-file success does not prove subfolder matching, which depends on the runtime listObjects key carrying a leading slash (/sub/file). Degrades gracefully (no chip, never a crash) and matches the existing Tags action either way.
  • Edit tags via ⋮ → chips update immediately.
  • Untagged file → no chip row (no extra vertical gap); a file with 3+ tags → two chips + "+N".

🤖 Generated with Claude Code

Mirror the category tabs: file rows in the Cloud Files manager now show
compact tag chips under the name, reusing WebTagService.tagsForObjects.

- _fileTags map refreshed after each listing (indexed over the WHOLE flat
  bucket, so subfolder rows resolve without a reload) and after a tag edit
- chips rendered in the row subtitle (up to 2 + "+N"), only when present
- _fileTags cleared on bucket switch to avoid a stale cross-bucket flash
- _TagChipRow duplicated from WebBucketScreen (copy #2; extract on #3)

No SDK / shared-service changes; tagsForObjects + _bareKey untouched, so
chips compute identically to the already-shipped Tags action.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ehsan6sha
ehsan6sha merged commit 0f3e1e7 into main Jun 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant