Skip to content

feat(portal): compute image and flavor UI improvements#912

Merged
TilmanHaupt merged 23 commits into
mainfrom
til-ui-imp
Jun 16, 2026
Merged

feat(portal): compute image and flavor UI improvements#912
TilmanHaupt merged 23 commits into
mainfrom
til-ui-imp

Conversation

@TilmanHaupt

@TilmanHaupt TilmanHaupt commented Jun 12, 2026

Copy link
Copy Markdown
Member

feat(portal): compute image and flavor UI improvements

Summary

  • Images — action parity between list and detail page

    • Detail page now shows "More Actions" for shared images (pending and accepted), with Accept/Reject items matching the list row
    • SharedImageBox in the detail body retains its inline Accept button for pending images
    • Suggested (pending) images do not show a redundant More Actions button — SharedImageBox handles it
  • Images — copyable IDs

    • Image ID and Owner/Shared-by Project ID on the detail page now use ClipboardText for one-click copy
  • Flavors — spec permission granularity

    • Users with flavor_specs:list (view-only) now see a Metadata button on both the detail page and the list row
    • Users with flavor_specs:create or flavor_specs:delete see Edit Metadata instead
    • Users with no spec permissions see nothing (previous behavior for list row; now consistent with detail page)
    • EditSpecModal receives canEdit in both places — read-only vs editable mode
    • Wrong permissions are catched in an error boundry
  • Flavors — list row polish

    • Popup menu uses the default icon toggle (hamburger), consistent with the Images list
    • Manage Access item is disabled for public flavors (consistent with detail page)
    • Added ErrorBoundry

Related Issues

Closes #902
Closes #903
Closes #907
Closes #908
Closes #909
Closes #913
Closes #917

Testing

Images — copyable IDs

  • Open any image detail page
  • Click the ID value → toast/checkmark appears, ID is in clipboard
  • Click the Owner Project ID value → same behaviour

Images — shared image actions (accepted)

  • Open a shared image you have already accepted (visibility: shared, owner ≠ your project)
  • Confirm More Actions button is visible in the header
  • Open it → Reject item is present
  • Click Reject → confirm modal appears → confirm → image disappears from list

Images — shared image actions (pending / suggested)

  • Switch to the Suggested Images tab in the images list
  • Click a pending image row → navigate to detail page
  • Confirm no More Actions button in the header (SharedImageBox handles it)
  • SharedImageBox at the top of the detail body shows Accept button
  • Click Accept → image moves to accepted state

Flavors — Edit Metadata vs Metadata label

  • As a user with full spec permissions (flavor_specs:create/delete):
    • List row popup → item reads Edit Metadata
    • Detail page → button reads Edit Metadata; clicking it opens the modal in edit mode
  • As a user with view-only (flavor_specs:list only):
    • List row popup → item reads Metadata
    • Detail page → button reads Metadata; clicking it opens the modal in read-only mode
  • As a user with no spec permissions:
    • List row popup → no Metadata item
    • Detail page → no Metadata button
  • Wrong permission: should show an error message

Flavors — list row popup icon

  • Open the flavors list → each row's action button is the default hamburger icon (no text label), same as the images list

Flavors — Manage Access on list row and detail page

  • List row popup for a public flavor → Manage Access is present but disabled
  • List row popup for a private flavor → Manage Access is enabled
  • Detail page More Actions for a private flavor → Manage Access is present and enabled
  • Detail page More Actions for a public flavor → Manage Access is present but disabled
  • Note: Metadata / Edit Metadata intentionally appears as a standalone button next to More Actions on the detail page (not inside the menu)

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.

Summary by CodeRabbit

Summary

  • New Features

    • Added Access Type column to flavor list (Private/Public)
    • Made Image ID and Owner Project ID copyable
    • Shared-image Accept/Reject now uses confirmation dialogs and improves More Actions availability
  • Improvements

    • Updated flavor image/spec and metadata actions to be permission-aware (including “Metadata” vs “Edit Metadata”)
    • Manage Access disabled for public flavors; access dialogs/tables simplified
    • Improved long-text wrapping and header/action spacing
  • Bug Fixes

    • Added safer error handling with user-friendly messages on unexpected failures for Overview, Images, and Flavors

Move Reject to ContentHeader kebab for accepted shared images, add
Manage Access, and show unstyled Accept/Reject in the info box for
pending/rejected state. Hide More Actions when no items apply.
…on parity

- Images: More Actions for all shared images; Accept for pending; ID and owner
  use ClipboardText
- Flavors detail: Metadata button for view-only; "Edit Metadata" when editable
- Flavors list: fetch flavor_specs permissions; gate Metadata on permissions;
  default popup icon; pass canEdit to EditSpecModal
- Flavors list: Manage Access disabled for public flavors
@TilmanHaupt TilmanHaupt requested a review from Copilot June 12, 2026 10:40
@TilmanHaupt TilmanHaupt self-assigned this Jun 12, 2026
@TilmanHaupt TilmanHaupt marked this pull request as ready for review June 12, 2026 10:40
@TilmanHaupt TilmanHaupt requested a review from a team as a code owner June 12, 2026 10:40
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@TilmanHaupt, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 11 minutes and 24 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 87fda7ca-adb7-44b4-a7e0-cb579f24f44c

📥 Commits

Reviewing files that changed from the base of the PR and between a7b0052 and 2d6c1bb.

📒 Files selected for processing (7)
  • .changeset/tiny-wolves-fix.md
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageTableRow.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/images/$imageId.tsx
  • packages/aurora/src/locales/de/messages.po
  • packages/aurora/src/locales/de/messages.ts
  • packages/aurora/src/locales/en/messages.po
  • packages/aurora/src/locales/en/messages.ts
📝 Walkthrough

Walkthrough

This PR implements permission-aware UI improvements for flavor and image management. Flavor specs permissions (list, create, delete) are queried and propagated through list/detail routes to gate metadata modal labels and visibility. The flavor list gains an Access Type column showing public/private status; Manage Access is disabled for public flavors with a simplified DataGrid layout. Image detail pages offer modal-based Accept/Reject flows for shared-image members. ID and owner fields use clipboard-copy rendering, error boundaries catch permission-related promise rejections, and spacing is adjusted throughout.

Changes

Image and Flavor Permissions and UI Refinements

Layer / File(s) Summary
Flavor specs permissions foundation
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/List.tsx
Flavor permissions query expands to include specs create/delete/list permissions; canManageSpecs and canListSpecs derived booleans are computed and propagated through FlavorsContent to FlavorListContainer and flavor detail routes.
EditSpecModal permission-gated title and size
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/EditSpecModal.tsx
EditSpecModal accepts optional canEdit prop; when provided, permissionsPromise is short-circuited and resolvedCanEdit is set directly; modal title switches between "Edit Metadata" (editable) and "Metadata" (read-only); modal size changes from large to xl; content is wrapped in ErrorBoundary with SpecsError fallback.
Flavor list permission propagation
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/FlavorListContainer.tsx
Props interface adds canManageSpecs and canListSpecs; component destructuring receives these permissions; EditSpecModal receives canEdit prop derived from canManageSpecs to gate metadata label and editability.
Flavor Access Type column and navigation
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/FlavorListContainer.tsx
DataGrid increases columns to 7 and adds "Access Type" column displaying "Private"/"Public" based on os-flavor-access:is_public; Details action uses programmatic useNavigate instead of Link; Metadata menu item label/availability gated by canManageSpecs vs canListSpecs; Manage Access disabled for public flavors.
Flavor detail header actions and menu gating
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/flavors/$flavorId.tsx
Route permissions query expanded to include flavor_specs:list; canListSpecs derived alongside existing capability flags; isPublicFlavor introduced; header More Actions visibility gated by any of delete/manage access/specs permissions; metadata action in menu conditionally shown with permission-aware label; Manage Access disabled for public flavors; EditSpecModal receives canEdit={canManageSpecs}.
Manage Access modal DataGrid simplification
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/ManageAccessModal.tsx, TenantAccessFormRow.tsx, TenantAccessRow.tsx
Flavor ID column removed from access DataGrids (3 columns → 2); TenantAccessFormRowProps removes flavorId property; TenantAccessRow replaces flavor ID cell with tenant ID cell using break-all class; colSpan values adjusted throughout loading/empty states.
Image shared actions with Accept/Reject modals
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/images/$imageId.tsx
Modal import added; acceptModalOpen/rejectModalOpen state hooks introduced; isMemberAccepted and isImageOwner flags derived; More Actions menu conditionally shows Reject action for shared-with-me accepted members and Manage Access for owners; modals invoke handleMemberStatusChange with target status.
Image details clipboard copy and action simplification
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageDetailsView.tsx
ClipboardText imported; image ID and owner fields render via ClipboardText for copy-to-clipboard; SharedImageBox action rendering simplified to show Accept button for pending/rejected states and Reject only for pending.
Error boundary wrapping
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Overview.tsx, Images/List.tsx, Flavors/List.tsx
Overview, Images List, and Flavors List wrapped with ErrorBoundary to catch policy file mismatch errors that reject canUser/data promises via React.use(); error fallback renders translated message.
UI polish, clipboard copy IDs, and localization
packages/aurora/src/client/components/ContentHeader/ContentHeader.tsx, packages/aurora/src/client/routes/_auth/projects/$projectId/compute/flavors/-components/FlavorDetailsView.tsx, SpecRow.tsx, packages/aurora/src/locales/en/messages.po, packages/aurora/src/locales/de/messages.po
ContentHeader actions margin adjusted to mt-3; FlavorDetailsView imports ClipboardText and renders flavor ID with copy-to-clipboard; SpecRow adds break-all class for long text; English/German localization entries added for "Access Type" and error message.
Release notes
.changeset/silver-tigers-jump.md
Changeset documents image and flavor UI improvements including shared-image modal actions, permission-gated metadata labels, Access Type visibility, Manage Access restrictions, and clipboard-copy rendering.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant FlavorList
  participant FlavorDetail
  participant EditModal
  participant Permissions
  User->>FlavorList: view flavors
  FlavorList->>Permissions: request canManageSpecs, canListSpecs
  Permissions-->>FlavorList: return permissions
  FlavorList->>FlavorList: render Access Type column
  FlavorList->>FlavorList: Metadata label by canManageSpecs
  User->>FlavorDetail: click Details
  FlavorDetail->>Permissions: expand query for flavor_specs:list
  Permissions-->>FlavorDetail: return canListSpecs, canManageSpecs
  FlavorDetail->>FlavorDetail: gate More Actions by permissions
  User->>EditModal: click Metadata
  EditModal->>EditModal: resolvedCanEdit from canManageSpecs
  EditModal->>EditModal: title = canManageSpecs ? "Edit" : "View"
  EditModal->>EditModal: size = "xl"
Loading
sequenceDiagram
  participant User
  participant ImageDetail
  participant MoreActions
  participant ConfirmModal
  participant Handler
  User->>ImageDetail: view shared image
  ImageDetail->>MoreActions: show menu (if accepted member)
  User->>MoreActions: click Reject
  MoreActions->>ConfirmModal: open Reject confirmation
  User->>ConfirmModal: confirm
  ConfirmModal->>Handler: handleMemberStatusChange("rejected")
  Handler->>ImageDetail: update member status
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

aurora-portal, enhancement

Suggested reviewers

  • andypf
  • vlad-schur-external-sap

Poem

🐰 A rabbit hops through permissions,
Flavors now wear their access type with pride,
Shared images click to copy, accept with grace,
More Actions menu flows just right,
Error boundaries catch what may fall—
Polish and care in every detail bright!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main changes: compute image and flavor UI improvements covering the primary objectives of the PR.
Linked Issues check ✅ Passed The code changes comprehensively address all seven linked issues: #902 (shared image actions), #903 (action parity), #907 (metadata label permissions), #908 (access type column, hamburger icon, details hover), #909 (manage access disabled for public), #913 (overflow menu on detail page), and #917 (error boundaries).
Out of Scope Changes check ✅ Passed All changes are directly related to the PR's stated objectives. Updates to image/flavor UI components, permissions handling, error boundaries, and localization all align with the linked issues and PR summary.
Description check ✅ Passed The PR description is comprehensive and well-structured, covering all major changes with detailed testing instructions and a complete checklist.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch til-ui-imp

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the Compute Images and Flavors UX by aligning detail-page actions with list-row actions, improving copyability of identifiers, and refining flavor metadata/access behavior based on more granular permissions.

Changes:

  • Images: add shared-image Accept/Reject actions to the detail page header menu and make key IDs copyable via ClipboardText.
  • Flavors: introduce flavor_specs:list (view-only) support for opening the metadata modal, adjust labeling (“Metadata” vs “Edit Metadata”), and disable Manage Access for public flavors.
  • Flavors list polish: switch row “Details” to a fully clickable menu item, add an “Access Type” column, and remove redundant Flavor ID column in Manage Access.

Reviewed changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/aurora/src/locales/en/messages.ts Compiled Lingui messages updated (includes “Access Type”).
packages/aurora/src/locales/en/messages.po Adds “Access Type” string.
packages/aurora/src/locales/de/messages.ts Compiled Lingui messages updated (includes “Access Type”).
packages/aurora/src/locales/de/messages.po Adds “Access Type” msgid (untranslated).
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/images/$imageId.tsx Adds shared-image Accept/Reject actions to detail header and confirmation modals.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageDetailsView.tsx Uses ClipboardText for IDs and simplifies shared-image inline actions.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/flavors/$flavorId.tsx Adds flavor_specs:list support and disables Manage Access for public flavors.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/flavors/-components/FlavorDetailsView.tsx Makes Flavor ID copyable via ClipboardText.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/List.tsx Fetches and propagates flavor_specs:* permissions for list-row gating/labels.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/FlavorListContainer.tsx Adds Access Type column, updates row menu (clickable Details), gates metadata item by permissions, disables Manage Access for public.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/EditSpecModal.tsx Adds canEdit prop, dynamic modal title, and increases modal size for better wrapping.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/ManageAccessModal.tsx Removes Flavor ID column and adjusts grid column counts/colSpans.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/TenantAccessRow.tsx Removes Flavor ID cell to match updated Manage Access grid.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/TenantAccessFormRow.tsx Removes Flavor ID field/cell to match updated Manage Access grid.
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/SpecRow.tsx Adds break-all to prevent long metadata values from breaking layout.
packages/aurora/src/client/components/ContentHeader/ContentHeader.tsx Minor spacing tweak for header actions.
.changeset/silver-tigers-jump.md Release note entry for the UI changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .changeset/silver-tigers-jump.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changeset/silver-tigers-jump.md:
- Line 14: Update the changeset text to distinguish the two permission-gated
labels: clarify that users with view-only spec access (flavor_specs:list) see a
"Metadata" button, while users with create/delete permissions see the button
labeled "Edit Metadata" (per PR `#907`). Replace the current single sentence with
a brief line that explicitly lists both cases and their corresponding labels so
the release note is unambiguous.
- Line 8: Update the changelog line to accurately state that the More Actions
button appears only for accepted shared images (not all shared images);
reference the PR objective `#902` and the SharedImageBox behavior so the text
clarifies that pending/suggested shared images keep inline Accept/Reject actions
and do not show the More Actions menu.
- Around line 13-17: The Flavors changeset is missing two user-visible UI
updates: add a line documenting the new "Access Type" column (shows "Private" or
"Public") introduced in PR `#908` and note that the Manage Access modal's DataGrid
no longer includes the redundant "Flavor ID" column as changed in PR `#909`;
update the "Flavors" section to mention these two items (referencing the Access
Type column and the Manage Access modal / DataGrid Flavor ID removal) so release
notes reflect both UI changes.

In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/compute/-components/Flavors/-components/EditSpecModal.tsx:
- Around line 251-272: The modal title uses resolvedCanEdit but the inner
EditSpecContent still derives permissions from permissionsPromise; fix by making
canEdit the single source-of-truth: when building permissionsPromise in
EditSpecModal, if canEdit === false return a resolved promise like
Promise.resolve({ canCreate: false, canDelete: false }) (or else pass
resolvedCanEdit down as an explicit prop) and pass resolvedCanEdit (or the
explicit canCreate/canDelete booleans) into EditSpecContent so the body cannot
render add/delete controls when canEdit is false; update usages of
permissionsPromise, resolvedCanEdit, EditSpecModal and EditSpecContent
accordingly.

In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/compute/images/$imageId.tsx:
- Around line 323-329: The hasMoreActions boolean currently omits the owner
"Manage Access" permission path and doesn't verify whether shared-member actions
are actually applicable (e.g., member status), causing empty/hidden menus;
update the hasMoreActions computation (used by headerActions) to include the
owner Manage Access condition (the same check used when rendering the Manage
Access item) and add a status/status-gate for isSharedWithMe paths so only
members with actionable statuses contribute true; ensure checks reference
permissions (permissions.canUpdateMember, permissions.canDeleteMember,
permissions.canUpdate, permissions.canDelete), isSharedWithMe, image.protected,
and the same member-status predicate used in the Manage Access menu item so the
popup only appears when there are real actions.

In `@packages/aurora/src/locales/de/messages.po`:
- Around line 172-173: The msgid "Access Type" in the translation entry
currently has an empty msgstr; update the msgstr for that msgid to the correct
German translation (e.g., "Zugriffstyp" or preferred locale wording) so the
Flavors list header shows the localized value; edit the msgstr for msgid "Access
Type" in the messages.po (the entry containing msgid "Access Type") to contain
the German string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3cc4ab68-4263-408f-85f4-bf4b9ebb5d9d

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf0533 and 826e8dc.

📒 Files selected for processing (17)
  • .changeset/silver-tigers-jump.md
  • packages/aurora/src/client/components/ContentHeader/ContentHeader.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/EditSpecModal.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/FlavorListContainer.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/ManageAccessModal.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/SpecRow.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/TenantAccessFormRow.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/TenantAccessRow.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/List.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageDetailsView.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/flavors/$flavorId.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/flavors/-components/FlavorDetailsView.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/images/$imageId.tsx
  • packages/aurora/src/locales/de/messages.po
  • packages/aurora/src/locales/de/messages.ts
  • packages/aurora/src/locales/en/messages.po
  • packages/aurora/src/locales/en/messages.ts
💤 Files with no reviewable changes (2)
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/TenantAccessRow.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/TenantAccessFormRow.tsx

Comment thread .changeset/silver-tigers-jump.md Outdated
Comment thread .changeset/silver-tigers-jump.md
Comment thread .changeset/silver-tigers-jump.md Outdated
Comment thread packages/aurora/src/locales/de/messages.po Outdated
- More Actions only shown for actionable member statuses (pending/accepted),
  not for rejected or loading states — prevents empty popup menus
- headerActions condition scoped to non-shared images for edit buttons
- hasMoreActions includes owner Manage Access condition
- EditSpecModal: skip permissions network call when canEdit prop is provided,
  use it directly as source of truth for add/delete controls
- Add German translation for "Access Type" (Zugriffstyp)
- Update changeset with accurate descriptions per PR objectives
# Conflicts:
#	packages/aurora/src/locales/de/messages.ts
#	packages/aurora/src/locales/en/messages.ts
…oundary

Rejected promises from canUser/getExtraSpecs (e.g. unknown rule in policy file)
were propagating through React.use() and crashing the app. Wrapping the Suspense
in an ErrorBoundary keeps the error inside the modal.
@TilmanHaupt TilmanHaupt marked this pull request as ready for review June 15, 2026 13:41

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/images/$imageId.tsx (1)

132-132: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove unused Accept modal state and JSX.

The acceptModalOpen state is initialized but never set to true anywhere in the codebase—no menu item or button triggers it. The Accept modal rendered at lines 417-433 is unreachable. According to the PR objectives, pending shared-image members use the inline Accept button in SharedImageBox, while accepted members only see the Reject action in the More Actions menu. The Accept modal serves no purpose and should be removed.

🧹 Proposed cleanup
- const [acceptModalOpen, setAcceptModalOpen] = useState(false)
  const [rejectModalOpen, setRejectModalOpen] = useState(false)
  {toastData && <Toast {...toastData} />}

- {acceptModalOpen && (
-   <Modal
-     title={t`Accept Shared Image`}
-     open={acceptModalOpen}
-     onCancel={() => setAcceptModalOpen(false)}
-     confirmButtonLabel={t`Accept`}
-     onConfirm={() => {
-       setAcceptModalOpen(false)
-       handleMemberStatusChange("accepted")
-     }}
-   >
-     <p>
-       {t`Accept access to image`} <strong>{String(image.name ?? image.id)}</strong>?{" "}
-       {t`It will appear in your image list.`}
-     </p>
-   </Modal>
- )}
-
  {rejectModalOpen && (

Also applies to: 417-433

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/compute/images/$imageId.tsx
at line 132, Remove the unused Accept modal state and its corresponding JSX
rendering. Delete the state variable declaration for acceptModalOpen and
setAcceptModalOpen since it is never set to true and serves no purpose in the
application flow. Also delete the Accept modal JSX component that renders when
acceptModalOpen is true (this modal is unreachable and redundant since the
Accept functionality is already provided by the inline Accept button in
SharedImageBox for pending members). These removals align with the PR objective
where pending shared-image members use the inline Accept button while accepted
members only see the Reject action in the More Actions menu.
🧹 Nitpick comments (1)
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/images/$imageId.tsx (1)

323-330: ⚡ Quick win

Consider extracting intermediate variables for clarity.

The hasMoreActions logic now correctly includes the owner Manage Access path and gates shared-member actions by status (addressing the prior review), but the compound boolean remains dense. Extracting named flags would improve readability and make the four action categories explicit.

♻️ Optional refactor
  const isDeactivated = image.status === IMAGE_STATUSES.DEACTIVATED
  const isPrivate = image.visibility === IMAGE_VISIBILITY.PRIVATE
  const isMemberAccepted = myMemberData?.status === "accepted"
  const isImageOwner = image.owner === projectId
+
+ const hasSharedMemberActions =
+   isSharedWithMe && isMemberAccepted && permissions.canUpdateMember
+
+ const hasOwnerUpdateActions = !isSharedWithMe && permissions.canUpdate
+
+ const hasOwnerDeleteAction =
+   !isSharedWithMe && permissions.canDelete && !image.protected
+
+ const hasOwnerManageAccessAction =
+   !isSharedWithMe &&
+   isImageOwner &&
+   image.visibility === IMAGE_VISIBILITY.SHARED &&
+   (permissions.canCreateMember || permissions.canDeleteMember)
+
  const hasMoreActions =
-   (isSharedWithMe && isMemberAccepted && permissions.canUpdateMember) ||
-   (!isSharedWithMe && permissions.canUpdate) ||
-   (!isSharedWithMe && permissions.canDelete && !image.protected) ||
-   (!isSharedWithMe &&
-     isImageOwner &&
-     image.visibility === IMAGE_VISIBILITY.SHARED &&
-     (permissions.canCreateMember || permissions.canDeleteMember))
+   hasSharedMemberActions ||
+   hasOwnerUpdateActions ||
+   hasOwnerDeleteAction ||
+   hasOwnerManageAccessAction
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/compute/images/$imageId.tsx
around lines 323 - 330, The hasMoreActions logic is compound and difficult to
read with four distinct action categories merged into a single boolean
expression. Extract each of the four logical branches into named intermediate
boolean variables with descriptive names that clarify what action each condition
enables (for example, variables for shared member update capability, owner
update capability, owner delete capability, and owner manage access capability),
then simplify the hasMoreActions assignment to use these named flags with OR
operators for improved readability and maintainability.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/compute/images/$imageId.tsx:
- Line 132: Remove the unused Accept modal state and its corresponding JSX
rendering. Delete the state variable declaration for acceptModalOpen and
setAcceptModalOpen since it is never set to true and serves no purpose in the
application flow. Also delete the Accept modal JSX component that renders when
acceptModalOpen is true (this modal is unreachable and redundant since the
Accept functionality is already provided by the inline Accept button in
SharedImageBox for pending members). These removals align with the PR objective
where pending shared-image members use the inline Accept button while accepted
members only see the Reject action in the More Actions menu.

---

Nitpick comments:
In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/compute/images/$imageId.tsx:
- Around line 323-330: The hasMoreActions logic is compound and difficult to
read with four distinct action categories merged into a single boolean
expression. Extract each of the four logical branches into named intermediate
boolean variables with descriptive names that clarify what action each condition
enables (for example, variables for shared member update capability, owner
update capability, owner delete capability, and owner manage access capability),
then simplify the hasMoreActions assignment to use these named flags with OR
operators for improved readability and maintainability.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5a16ef1e-1c4e-4e67-b289-6261b93bd6cf

📥 Commits

Reviewing files that changed from the base of the PR and between 826e8dc and 805be05.

📒 Files selected for processing (9)
  • .changeset/silver-tigers-jump.md
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/EditSpecModal.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageDetailsView.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/flavors/$flavorId.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/images/$imageId.tsx
  • packages/aurora/src/locales/de/messages.po
  • packages/aurora/src/locales/de/messages.ts
  • packages/aurora/src/locales/en/messages.po
  • packages/aurora/src/locales/en/messages.ts
✅ Files skipped from review due to trivial changes (2)
  • packages/aurora/src/locales/en/messages.po
  • .changeset/silver-tigers-jump.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/EditSpecModal.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageDetailsView.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/flavors/$flavorId.tsx

TilmanHaupt and others added 2 commits June 15, 2026 16:01
…views

Policy file mismatches cause canUser/data promises to reject, which propagates
through React.use() and crashes the full page without a boundary.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 19 changed files in this pull request and generated 4 comments.

Comment thread .changeset/silver-tigers-jump.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Overview.tsx (1)

114-119: ⚡ Quick win

Use Message component for error fallback to match Images/Flavors list pattern.

The error fallback renders a plain <div> with text, while Images/List.tsx and Flavors/List.tsx use <Message variant="error"> for their ErrorBoundary fallbacks. Using the Message component provides consistent styling, iconography, and UX across compute views.

♻️ Proposed refactor to use Message component

Import Message:

 import { ActivitySummary } from "./ActivitySummary"
 import { Suspense, use } from "react"
 import { ErrorBoundary } from "react-error-boundary"
+import { Message } from "`@cloudoperators/juno-ui-components`"
 import { Server } from "`@/server/Compute/types/server`"

Update the fallback:

     <ErrorBoundary
       fallbackRender={({ error }) => (
-        <div className="p-4 text-center">
-          {error instanceof Error ? error.message : t`An unexpected error occurred.`}
-        </div>
+        <Message variant="error" text={error instanceof Error ? error.message : t`An unexpected error occurred.`} />
       )}
     >
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/compute/-components/Overview.tsx
around lines 114 - 119, The ErrorBoundary fallbackRender in Overview.tsx uses a
plain div for error display, which is inconsistent with the Message component
pattern used in Images/List.tsx and Flavors/List.tsx. Import the Message
component if not already imported, and replace the div wrapper with Message
variant="error" in the fallbackRender prop, maintaining the same error message
logic (showing error.message if the error is an Error instance, otherwise
showing the fallback message).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/aurora/src/locales/de/messages.po`:
- Around line 295-296: The msgstr field for the German translation of "An
unexpected error occurred." in the messages.po file is empty, causing German
users to see the English fallback in ErrorBoundary error messages. Fill in the
msgstr with an appropriate German translation of this error message to maintain
locale consistency and provide a proper German user experience. The msgid "An
unexpected error occurred." (with trailing period) is the entry that needs the
translation added.

---

Nitpick comments:
In
`@packages/aurora/src/client/routes/_auth/projects/`$projectId/compute/-components/Overview.tsx:
- Around line 114-119: The ErrorBoundary fallbackRender in Overview.tsx uses a
plain div for error display, which is inconsistent with the Message component
pattern used in Images/List.tsx and Flavors/List.tsx. Import the Message
component if not already imported, and replace the div wrapper with Message
variant="error" in the fallbackRender prop, maintaining the same error message
logic (showing error.message if the error is an Error instance, otherwise
showing the fallback message).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0b087888-b823-456e-bbc7-4b460414718d

📥 Commits

Reviewing files that changed from the base of the PR and between 805be05 and a7b0052.

📒 Files selected for processing (9)
  • .changeset/silver-tigers-jump.md
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/EditSpecModal.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/List.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Images/List.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Overview.tsx
  • packages/aurora/src/locales/de/messages.po
  • packages/aurora/src/locales/de/messages.ts
  • packages/aurora/src/locales/en/messages.po
  • packages/aurora/src/locales/en/messages.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • .changeset/silver-tigers-jump.md
  • packages/aurora/src/locales/en/messages.po
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/List.tsx
  • packages/aurora/src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/EditSpecModal.tsx

Comment thread packages/aurora/src/locales/de/messages.po
@TilmanHaupt TilmanHaupt requested a review from ArtieReus June 16, 2026 11:54
Missed in 5f77999 — apply the same direct-call pattern already used in
the image detail page (call handleMemberStatusChange directly, no modal).
@TilmanHaupt TilmanHaupt enabled auto-merge (squash) June 16, 2026 12:12
@TilmanHaupt TilmanHaupt added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed compute portal aurora-portal pr-build Triggers Docker image build for PR preview push image to GHCR. labels Jun 16, 2026
@TilmanHaupt TilmanHaupt disabled auto-merge June 16, 2026 12:54
@TilmanHaupt TilmanHaupt enabled auto-merge (squash) June 16, 2026 12:54
@TilmanHaupt TilmanHaupt merged commit 42471fb into main Jun 16, 2026
31 checks passed
@TilmanHaupt TilmanHaupt deleted the til-ui-imp branch June 16, 2026 12:54
@github-project-automation github-project-automation Bot moved this from New to Done in Aurora Roadmap Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment