Skip to content

Fix org images and logo uploads#1531

Merged
riderx merged 3 commits into
mainfrom
riderx/org-image-table
Jan 30, 2026
Merged

Fix org images and logo uploads#1531
riderx merged 3 commits into
mainfrom
riderx/org-image-table

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented Jan 30, 2026

Summary (AI generated)

  • Sign RBAC org member avatars
  • Show org logos in selector with fallback initials
  • Allow org logo uploads in private images bucket

Test plan (AI generated)

  • Not run (not requested)

Screenshots (AI generated)

  • N/A

Checklist (AI generated)

  • My code follows the code style of this project and passes
    .
  • My change requires a change to the documentation.
  • I have updated the documentation
    accordingly.
  • My change has adequate E2E test coverage.
  • I have tested my code manually, and I have provided steps how to reproduce
    my tests

Generated with AI

Summary by CodeRabbit

  • New Features

    • Organizations now show logos in the dropdown with initials as a fallback.
    • Access controls added for image uploads to support secure org logo and avatar management.
  • Improvements

    • Member avatars now use signed image URLs for secure loading.
  • Documentation

    • Local development commands updated to use Bunx-prefixed CLI invocations.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings January 30, 2026 04:09
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

This PR adds organization logo display with initials fallback in the dashboard dropdown, implements signed URL generation for member avatar images during RBAC member reload, and adds path-based Supabase storage policies for the images bucket to control org logos, app icons, and user avatars.

Changes

Cohort / File(s) Summary
Organization Logo UI
src/components/dashboard/DropdownOrganization.vue
Added acronym(name) helper and updated header and list items to render organization.logo when present, otherwise show initials block generated from the organization name. Presentation-only change; click behavior unchanged.
Member Avatar Signing
src/pages/settings/organization/Members.vue
Integrated createSignedImageUrl into RBAC member reload flow; member mapping now awaits async signed-url generation and replaces image_url with signed URL or "" fallback. Non-RBAC flow unchanged.
Storage Access Control (SQL)
supabase/migrations/20260130040811_allow_org_logo_upload.sql
Adds/replaces storage policies for images bucket: path-based rules for org app icons (org/{org_id}/{app_id}/...), org logos (org/{org_id}/logo/...), and user avatars; uses public.check_min_rights, public.get_identity_org_appid, and public.get_identity_org_allowed plus ownership checks for inserts/updates/deletes.
Docs / CLI updates
AGENTS.md
Replaced local Supabase CLI examples with bunx supabase ... equivalents across setup and migration instructions (text-only changes).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐇✨ I hop through dropdowns, whiskers bright,
I stitch initials when logos take flight,
I sign each avatar with a careful paw,
Guarding pictures with a soft, secure law,
Hooray — a tiny rabbit's celebratory hop! 🥕🎨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes a summary and checklist but lacks the required test plan with concrete testing steps and screenshots section, which are marked as optional but notably absent. Provide a detailed test plan with specific steps to validate the changes (signing avatars, logo display, and bucket uploads) and include relevant screenshots demonstrating the functionality.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main changes: fixing org image uploads and enabling logo uploads.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch riderx/org-image-table

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables org logo/avatar images to work correctly after moving the images bucket to private by ensuring signed URLs are used in the UI and storage policies allow the necessary reads/writes.

Changes:

  • Recreates storage.objects RLS policies for the images bucket to allow org logo reads/writes under org/{org_id}/logo/... while preserving existing app icon + avatar behavior.
  • Signs RBAC org member avatar paths into signed URLs when building the members table data.
  • Updates the organization dropdown to render org logos when available, otherwise falls back to initials.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
supabase/migrations/20260130040811_allow_org_logo_upload.sql Updates images bucket policies to permit org logo read/write paths in private storage.
src/pages/settings/organization/Members.vue Uses createSignedImageUrl for RBAC member image_url so avatars render from private storage.
src/components/dashboard/DropdownOrganization.vue Displays org logos in the dropdown with an initials fallback UI.

@sonarqubecloud
Copy link
Copy Markdown

@riderx riderx merged commit b7cb94a into main Jan 30, 2026
11 checks passed
@riderx riderx deleted the riderx/org-image-table branch January 30, 2026 04:56
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.

2 participants