Skip to content

feat(ui): enhance workspace switcher and company logo settings#497

Merged
wisdomqin merged 1 commit intoreleasefrom
feat/UI_enhance
Apr 28, 2026
Merged

feat(ui): enhance workspace switcher and company logo settings#497
wisdomqin merged 1 commit intoreleasefrom
feat/UI_enhance

Conversation

@wisdomqin
Copy link
Copy Markdown
Contributor

Summary

  • Replace the sidebar Clawith logo area with a Notion-style company/workspace switcher.
  • Move create/join company into a modal and keep company settings in the workspace menu.
  • Add company logo upload with 1:1 crop flow, 1 MB validation, backend storage/serving, and i18n text.
  • Remove the duplicate lower-left company settings entry.
  • Include PR fix(frontend): notification panel never fetches list on bell click #495 notification bell behavior: rely on enabled query fetch instead of synchronous manual refetch.

Verification

  • npm run build
  • python -m py_compile backend/app/api/tenants.py backend/app/models/tenant.py backend/app/api/auth.py backend/app/schemas/schemas.py
  • git diff --check

Merge Notes

This branch was cut from an older release. Latest origin/release adds tenant default_model_id; this branch adds tenant logo_url. If GitHub reports conflicts, resolve by keeping both fields:

  • TenantOut: keep both default_model_id and logo_url.
  • Tenant: keep both the default_model_id mapped column and the logo_url property.

I validated that latest origin/release plus this resolution builds successfully in a temporary worktree.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b04648b8ab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +654 to +660
<button
type="button"
className="tenant-switcher-action"
onClick={() => {
setShowTenantMenu(false);
navigate('/enterprise');
}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Gate company-settings action to admin roles

The new workspace popover always renders the Company settings action, so member/agent_admin users can now navigate to /enterprise even though tenant management APIs (e.g. get_tenant in backend/app/api/tenants.py) explicitly require org_admin or platform_admin. This introduces a broken path for non-admin users and exposes an admin-only entry point that was previously role-gated in the sidebar; wrap this button in the same role check as before.

Useful? React with 👍 / 👎.

Comment on lines +547 to +551
data = await file.read()
if len(data) > 1024 * 1024:
raise HTTPException(status_code=400, detail="Logo image must be 1 MB or smaller")
try:
image = Image.open(io.BytesIO(data))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject oversized logo dimensions before decoding

The upload handler enforces only encoded file size (<=1 MB) but then fully decodes and converts the image without any pixel-dimension cap. Highly compressed large PNG/WebP files can stay under 1 MB while expanding to very large in-memory buffers during image.load()/convert("RGBA"), which can stall or OOM API workers. Add a maximum width/height (or total pixel) check before expensive processing.

Useful? React with 👍 / 👎.

@wisdomqin wisdomqin merged commit 8e019ef into release Apr 28, 2026
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