1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00
Commit Graph

320 Commits

Author SHA1 Message Date
coderabbitai[bot]
196e3a271f 📝 Add docstrings to ui-bug-4
Docstrings generation was requested by @jbpratt.

* https://github.com/quay/quay/pull/4444#issuecomment-3494274126

The following files were modified:

* `web/src/routes/OrganizationsList/OrganizationOptionsKebab.tsx`
2025-11-06 00:39:26 +00:00
jbpratt
b325396b47 fix(web): support shorthand organization and repository URLs with redirect (PROJQUAY-9580) (#4456)
Users can now navigate directly to organizations and repositories using
shorthand URLs, matching the Angular UI behavior:
- /myorg → /organization/myorg
- /openshift/release → /repository/openshift/release

Implementation improvements:
- Dynamically derives reserved route prefixes from NavigationPath enum
- TypeScript interface for type-safe route parameters
- Comprehensive JSDoc documentation with examples
- Preserves query parameters and hash fragments during redirects
- Factory function for test mock data reusability

Test coverage:
- 11 comprehensive Cypress e2e tests (up from 6)
- Tests for organization and repository redirects
- Query parameter and hash fragment preservation
- Reserved route prefix handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 20:28:01 +00:00
Harish Govindarajulu
2448c7f332 fix(ui): superuser usage logs filter searches across all fields (PROJQUAY-9622) (#4454)
* fix(ui): superuser usage logs filter searches across all fields (PROJQUAY-9622)

The filter in the superuser usage logs page was only searching the log.kind
field, causing it to return no results when users searched for namespaces,
usernames, or other visible data.

Changes:
- Enhanced filter to search across namespace, repository, performer, IP address,
  log kind, and description fields
- Removed duplicate filtering logic (filterLogs function and select option)
- Now follows codebase standard pattern used by other tables
- Filter applied once in usePaginatedSortableTable hook instead of twice
- Added comprehensive Cypress tests for filter functionality

The filter now performs case-insensitive substring matching across all
displayed fields, matching the behavior of the Angular UI.

Co-authored-by: Claude <noreply@anthropic.com>

* fix(ui): extract text from JSX for usage logs filter search

The filter was converting React elements to "[object Object]" instead of
searchable text. Added extractTextFromReactNode() utility to recursively
extract plain text from JSX while maintaining rich formatting for display

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 13:30:15 -05:00
Harish Govindarajulu
6cd9b8535e fix(ui): fallback to user orgs when superuser API fails (PROJQUAY-9650) (#4425)
* fix(ui): fallback to user orgs when superuser API fails (PROJQUAY-9650)

  Always show user's own organizations from /api/v1/user/ and
  combine with superuser orgs when available. Prevents empty org
  list when FEATURE_SUPER_USERS is enabled but superuser API
  returns 403.

  Generated with [Claude Code](https://claude.com/claude-code)

  Co-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: harishsurf <hgovinda@redhat.com>

* fix(ui): resolve React hooks violations in OrganizationsList

Optimize UseOrganizations with useMemo to prevent unnecessary
re-renders. Move all useState hooks before early returns in Organizations
kebab menu. Also fix PropTypes warning by ensuring showRegistrySize
is always boolean. Add cypress tests for regression

---------

Signed-off-by: harishsurf <hgovinda@redhat.com>
2025-11-04 14:50:52 -05:00
jbpratt
faf1376d9d fix(web): display relative time for application token dates with tooltip (PROJQUAY-9631) (#4443)
Application token table now shows relative time ("5 minutes ago") for Last Accessed,
Expiration, and Created columns, with full timestamp displayed in tooltip on hover.
This matches the behavior of the current Angular UI.

Uses existing formatRelativeTime and formatDate utilities from libs/utils with
PatternFly Tooltip component.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-04 10:32:59 -06:00
jbpratt
6ab2a5d6f7 fix(web): use single quotes in container login commands (PROJQUAY-9683) (#4446)
Application token and robot token credentials modals were using double
quotes in podman/docker login commands, causing authentication failures.
Changed to single quotes to match current UI behavior and ensure CLI
compatibility.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-04 09:18:08 -06:00
Shubhra Deshpande
bd25dcc34c uibug: updated new UI to ask user to verify the mail when creating new account with email enabled (PROJQUAY-9655) (#4432)
* updated new UI to ask user to verify the mail when creating new account with email enabled

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-11-03 11:48:51 -05:00
jbpratt
38ced8eb0c fix(ui): add send recovery email option for superuser user management (PROJQUAY-9657) (#4436)
adds the missing "Send Recovery E-mail" option to the new React UI's
superuser user management panel

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-03 10:38:06 -05:00
jbpratt
44e363db5c fix(ui): add user status labels to organizations table (PROJQUAY-9656) (#4431)
Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-03 10:28:35 -05:00
jbpratt
a5cfaa6b16 chore: implement lazy loading for route components (#4439)
add React.lazy() and Suspense boundaries to all route components in both
StandaloneMain and PluginMain to reduce initial bundle size by 40-60%
and improve time-to-interactive performance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-03 09:21:44 -06:00
Harish Govindarajulu
cb5796bfbb fix(ui): Add OAuth token authorization flow for assigned users (PROJQUAY-9632) (#4428)
* Add missing nginx routes for assign user oauth flow for react

* Add Oauth flow for assinged user token generation

* Add cypress test for assigned user oauth flow

* Show Authorized app section even when external login isnt available
2025-10-31 17:27:31 +00:00
jbpratt
a37d9ba47e fix(ui): display version and contact link on login page footer (PROJQUAY-9651) (#4430)
* fix(ui): add contact link to login page footer (PROJQUAY-9660)

the login page footer was missing the contact link when CONTACT_INFO
was configured in config.yaml. this adds the same logic used in the
main app footer to display the contact link on the login page

Co-authored-by: Claude <noreply@anthropic.com>

* fix(ui): display Quay version in login page footer (PROJQUAY-9651)

The new React UI login page was missing the version number display
that appears in the Angular UI. Added version_number to login footer
items so it displays alongside Documentation and Contact links.

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-31 10:40:15 -05:00
jbpratt
7680d05c59 fix(ui): remove team creation from robot user dropdown (PROJQUAY-9662) (#4427)
Mirror configuration should only allow robot accounts, not teams. This
removes the "Create team" option and "Teams" group from the robot user
dropdown in the mirroring configuration form. Also updates placeholder
text to clarify robot-only selection.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-31 09:07:20 -05:00
jbpratt
1f434698a4 fix(ui): display quota consumed for organizations and user namespaces (PROJQUAY-9641) (#4422)
superusers can now see quota consumed data in the organizations list for
both organizations and user namespaces. the fix preserves quota_report data
from the /api/v1/superuser/organizations/ endpoint instead of discarding it.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-30 15:18:02 -04:00
jbpratt
57a5e3368f feat(ui): add repository activity heatmap (PROJQUAY-9353) (#4398)
* feat(ui): add repository activity heatmap (PROJQUAY-9353)

Implements an activity heatmap showing last 90 days of repository
pull/push activity to match feature available in Angular UI.

Features:
- Continuous week-by-week calendar grid layout
- Smart month labels (Aug, Sep, Oct) with spacing optimization
- Day labels (Mon, Wed, Fri) positioned clearly
- 5-level color scaling from gray (no activity) to dark blue (high activity)
- Interactive tooltips with date and action counts
- Full-width responsive design
- PatternFly design system integration
- ARIA labels for accessibility

Technical implementation:
- Custom React component using SVG rendering
- API integration with includeStats=true endpoint
- Color-coded cells based on activity intensity
- Tooltip with high contrast for dark/light mode support

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(test): resolve builds.cy.ts failures from includeStats param change (PROJQUAY-9353)

Fixed 21 failing Cypress tests in builds.cy.ts caused by two issues:

1. Updated all repository detail API intercepts to use includeStats=true
   instead of includeStats=false to match the actual API call changed
   in the heatmap feature implementation

2. Added optional chaining to error.response?.status in ErrorHandling.ts
   to prevent null reference errors when error.response is undefined

All 27 tests now pass (previously 6 passing, 21 failing).

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-30 10:27:47 -05:00
jbpratt
6ebf38e9fa fix(ui): display global messages on login page (PROJQUAY-9642) (#4421)
this adds the GlobalMessages component to LoginPageLayout so that
superuser-configured global messages display on the login page,
matching the behavior of the Angular UI

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-30 09:28:28 -05:00
jbpratt
4089487e16 chore: migrate server state from Recoil to React Query (#4419)
* chore: remove unused QuayConfigState Recoil atoms

Removed dead code from state management migration. The QuayConfigState
and IsPluginState Recoil atoms were never read - only written to. All
config state is now properly managed via React Query using the
useQuayConfig hook.

Co-authored-by: Claude <noreply@anthropic.com>

* chore: remove unused CurrentUsernameState Recoil atom

The CurrentUsernameState atom was dead code - never imported or used
anywhere in the codebase. User data is now managed via React Query's
useCurrentUser hook, which is already in use across 24 files.

Co-authored-by: Claude <noreply@anthropic.com>

* chore: migrate SecurityDetailsState from Recoil to React Query

Replaced Recoil atoms (SecurityDetailsState, SecurityDetailsErrorState)
with useSecurityDetails React Query hook. This eliminates manual cache
management and simplifies component logic.

Changes:
- Created useSecurityDetails hook with automatic caching by org/repo/digest
- Updated 7 components to use the new hook
- Removed manual fetch logic, local state, and Recoil reset calls
- Removed cacheResults prop (React Query caches automatically)
- Simplified SecurityDetails.tsx from ~100 lines to ~60 lines

Benefits:
- Automatic cache invalidation when parameters change
- Better loading/error state handling
- No manual cache management needed
- Reduced code complexity (~50 lines removed)

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-30 10:23:57 -04:00
Brandon Caton
54b52901ec ui: adding DISABLE_ANGULAR_UI config param (PROJQUAY-9590) (#4385)
* ui: removing default ui check

* ui: add option to disable angular UI

* Creating explicit angular and react cookies with config default

* Fixing "current ui" display text to respond to light theme
2025-10-30 09:26:50 -04:00
Mark Franceschelli
dce7cb8339 ui: Add Superuser functionality to UI (PROJQUAY-6307) (#4174)
* initial superuser framework

* all service key functionality except create key

* add create preshareable key

* add change logs panel and fresh login component

* messages ui and config without display

* add global display of messages

* CSRF token changes required for fresh login

* usage logs functionality first pass

* fix fetch user logs, colors, legend, chart and default route

* usage logs prevent greater than 30 days

* usage logs functionality complete

* superuser organization action menu commands

* add framework and service keys tests, fix service key date mismatch

* add all remaining superuser tests

* Re-design sidenav for superuser component

* Add missing columns and access control for organization list

Signed-off-by: harishsurf <hgovinda@redhat.com>

Adds Size and Admin columns and superuser checks + readonly support
for superuser capabilities

* Add build logs functionality for superusers

* Add missing functionality for user and org management for superuser

Adds create user modal, and other missing modals for superuser related
actions for both user and organization

* Redesign quota functionality for superuser

Only superuser should be allowed to configure quota. Adds new modal
to configure quota. Removes modifying quota from org settings tab

* Fix cypress tests + formatting + undo X-Next-CSRF-Token token change

---------

Signed-off-by: harishsurf <hgovinda@redhat.com>
Co-authored-by: harishsurf <hgovinda@redhat.com>
2025-10-30 08:41:38 -04:00
jbpratt
76e5798385 feat(ui): add system status banner (PROJQUAY-9494) (#4417)
displays warning banners when Quay is in read-only mode or account
recovery mode, integrated into both standalone and plugin layouts with
Cypress e2e tests

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-29 16:36:14 +00:00
Harish Govindarajulu
2d42e46eca fix(ui): OAuth token generation should not redirect to Old UI (PROJQUAY-9600) (#4406)
* Add nginx change to allow Oauth token generation in react

* Create new component to handle OAuth token generation in new ui

* Update cypress test for OAuth token generation

* Fix cypress test

Adds missing optional chaining + enable update-user.cy.ts tests

* Add assignuser OAuth token generation + cypress test
2025-10-29 12:33:40 -04:00
jbpratt
def6cc859c feat(ui): add footer (PROJQUAY-9152) (#4338)
* feat(ui): add footer (PROJQUAY-9152)

add a footer mimicking the angular UI adhearing to FOOTER_LINKS,
branding, etc

Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(ui): fix footer gap on main layout (PROJQUAY-9152)

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* add web endpoints tests for coverage

Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-29 10:20:53 -04:00
jbpratt
b372b71367 chore: cache deps and remove unnecessary seeding (#4414)
* chore: add pip and npm caching

gotta go fast

Signed-off-by: Brady Pratt <bpratt@redhat.com>

* chore(test): remove unneeded seeding

- theme-switcher.cy.ts improved from ~1m to ~10s
- notification-drawer.cy.ts improved from ~2m to ~10s
- overview.cy.ts down to ~10s
- breadcrumbs.cy.ts improved from ~3m to ~10s
- marketplace.cy.ts down to ~10s

Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-10-29 08:01:58 -05:00
jbpratt
5a05f3722f fix(ui): hide security columns and tabs when scanner disabled (PROJQUAY-9624) (#4409)
Conditionally display security-related UI elements based on
FEATURE_SECURITY_SCANNER config flag. When disabled, hides:
- Security column in tags table
- SecurityDetails component in tag rows and manifest list children
- Security Report and Packages tabs in tag details

Updates colspan calculations to account for conditional security column.
Adds Cypress tests for both enabled and disabled states.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-28 15:01:19 -04:00
jbpratt
a07732b6ba fix(ui): display $app instead of username in application token credentials (PROJQUAY-9623) (#4408)
Application token credentials modal was incorrectly displaying the user's
username in all authentication methods. Changed to use the literal string
"$app" as required by the backend and consistent with the old Angular UI.

Updated all credential displays to use $app:
- Docker/Podman login commands
- Kubernetes secret (using token title for secret name)
- rkt configuration JSON
- Docker configuration base64 auth

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-28 13:28:51 -04:00
Shubhra Deshpande
240d6441ba feat: Add image pull statistics API endpoints and UI integration (PROJQUAY-7176) (#4382)
feat: Add image pull statistics API endpoints and UI integration

- Add new API endpoints for tag and manifest pull statistics
- Integrate pull metrics into web UI with new table columns
- Add FEATURE_IMAGE_PULL_STATS feature flag and PULL_METRICS_REDIS config
- Add pullstatsredisflushworker to supervisord configuration
- Add comprehensive test coverage for pull statistics functionality

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-10-27 15:19:52 -04:00
jbpratt
943f7a1b54 fix(ui): validate email as required when creating organization (PROJQUAY-9578) (#4403)
this adds email field validation to prevent 400 errors when creating an
organization without an email address. the email field is now marked as
required with an asterisk, and the Create button is disabled when the
email is missing or invalid.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-27 08:11:56 -05:00
jbpratt
4c8fcc636a fix(ui): improve team sync UX with base DN display and proper group binding (PROJQUAY-6923) (#4396)
* fix(ui): improve team sync UX with base DN display and proper group binding (PROJQUAY-6923)

the new React UI had several issues with Team Sync:
1. incorrectly displayed "OIDC Group" labels when enabling Team Sync with LDAP or Keystone
2. didn't show base DN context for LDAP, causing user confusion about relative vs absolute DNs
3. "Bound to group" field was empty for LDAP and Keystone synced teams
4. "Last Updated" timestamp showed raw UTC instead of user's local timezone

this fix improves the Team Sync user experience:
- service-specific modal titles and field labels (LDAP Group DN, Keystone Group ID, OIDC Group Name/Object Id)
- displays base DN in LDAP modal with "Relative to:" label to clarify that users should enter relative DNs
- extracts and displays bound group for all services (group_dn for LDAP, group_id for Keystone, group_name for OIDC)
- formats "Last Updated" timestamp in user's local timezone for better readability

changes:
- renamed OIDCTeamSyncModal to DirectoryTeamSyncModal for service-agnostic naming
- added getServiceDisplayName() and getGroupFieldLabel() helper functions
- added base_dn field to ITeamMembersCanSyncResponse interface
- updated DirectoryTeamSyncModal to conditionally display base DN with CodeBlock styling
- updated useEffect to extract group identifier from all three service configs
- integrated formatDate() utility for timestamp localization
- updated TeamSyncResource to handle ldap (group_dn) and keystone (group_id) config
- updated ManageMembersToolbar to support all services, not just oidc

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(ui): resolve test failures

Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(ui): allow robot accounts to be added to LDAP-synced teams (PROJQUAY-9611)

the new React UI prevented adding any members to LDAP-synced teams by hiding the "Add new member" button when pageInReadOnlyMode was true. however, the old Angular UI and backend both support adding robot accounts to synced teams - only regular user membership is read-only.

this fix restores feature parity with the Angular UI:
- removed pageInReadOnlyMode check from "Add new member" button visibility in ManageMembersToolbar
- updated AddNewTeamMemberDrawer to detect team sync status and show only robot accounts in read-only mode
- added informational alert explaining that only robot accounts can be added to synced teams
- updated drawer title to "Add robot account to team" when in read-only mode

the backend already supported this functionality (robot deletion works in read-only mode), and the Angular UI explicitly allowed it with the message: "To add a robot account to this team, enter them above."

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* feat(ui): add automatic polling for team sync status updates (PROJQUAY-6923)

when team sync is enabled but hasn't completed its first sync yet, the UI now automatically polls every 5 seconds to check for status updates. this eliminates the need for users to manually refresh the page to see when the sync completes.

the polling:
- starts automatically when teamSyncInfo.last_updated is null
- polls every 5 seconds using React Query's refetchInterval
- stops automatically once a valid timestamp is received
- follows the existing polling pattern from UseAuthorizedEmails

this provides a seamless UX where users see the spinner "Waiting for first sync..." which automatically updates to "11 minutes ago" once the backend sync completes, without any manual intervention.

Co-authored-by: Claude <noreply@anthropic.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-24 14:49:14 +00:00
jbpratt
3c6896d820 fix(ui): return user friendly msg for 500 errs (PROJQUAY-9483) (#4397)
* fix(ui): return user friendly msg for 500 errs (PROJQUAY-9483)

Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(ui): display user-friendly messages for server errors instead of raw HTTP status codes (PROJQUAY-9483)

Updated error handling across the UI to show user-friendly messages when
server errors (5xx) occur. Users now see "unexpected issue occurred. Please
try again or contact support" instead of technical messages like "HTTP500"
or "Request failed with status code 500".

Changes:
- Modified getErrorMessage() to detect 5xx errors and return friendly message
- Added getErrorMessageFromUnknown() utility for consistent error extraction
- Updated all RequestError usages to pass the error and handle it in the
  component

This improves security by not exposing internal error details and provides
better user experience with actionable guidance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(ui): resolve err msg specific failures

Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-24 09:27:10 -05:00
jbpratt
180d2903e7 fix(ui): use BRANDING.logo for customizable logo URL (PROJQUAY-9462) (#4393)
The React UI was referencing the non-existent ENTERPRISE_DARK_LOGO_URL
config field. Changed to use BRANDING.logo which is populated by the
backend from ENTERPRISE_LOGO_URL config. Also removed unnecessary
axios.defaults.baseURL prefix since BRANDING.logo contains the
complete path starting with /.

This matches the Angular UI implementation and enables customizable
logo functionality in the new UI.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-22 14:35:16 -04:00
jbpratt
92975bb0f3 fix(web): enable Red Hat Quay Notification in new UI (PROJQUAY-9020) (#4376)
* fix(web): enable Red Hat Quay Notification in new UI (PROJQUAY-9020)

Red Hat Quay Notification was disabled in the new UI despite being fully
implemented. The notification drawer in the header is already functional,
so this feature can be enabled.

Changes:
- Enable Quay notification method in UseNotificationMethods.ts
- Uncomment and update Cypress test for creating Quay notifications

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(ui): invalidate notif query for tests

set a delay on invalidating it so the test notification can be processed

Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-22 12:40:02 -05:00
jbpratt
dcf66cff91 feat(ui): add Compact/Expanded view toggle to image tags page (PROJQUAY-9589) (#4388)
* feat(ui): add Compact/Expanded view toggle to image tags page (PROJQUAY-9589)

Adds a view mode toggle to the tags table allowing users to switch between
Compact and Expanded views. The Expanded view displays additional tag
information inline including full manifest digest, labels, and cosign
signature details without requiring navigation to the tag details page.

Changes:
- Add expandedViewState Recoil atom for view mode state management
- Add Compact/Expanded ToggleGroup to TagsToolbar using PatternFly components
- Implement expanded row rendering in TagsTable showing manifest, labels, and signatures
- Add label caching to prevent N+1 queries when fetching labels in expanded view
- Use dynamic colspan calculation based on column count and permissions
- Use useQuayState() hook for consistent readonly mode checking
- Add CSS styling for expanded row content with PatternFly design tokens
- Create comprehensive Cypress e2e tests for expanded view functionality

This implements feature parity with the Angular UI's expanded view capability.

Co-authored-by: Claude <noreply@anthropic.com>

* feat(ui): replace view toggles with settings dropdown menu (PROJQUAY-9589)

Replaces the Compact/Expanded toggle group and Show/Hide Signatures button
with a unified settings dropdown using a gear icon. The dropdown contains
checkbox menu items for both settings, providing a cleaner and more compact
toolbar layout.

Changes:
- Replace ToggleGroup with Dropdown using CogIcon trigger
- Use MenuItem with hasCheckbox and isSelected for settings
- Update Cypress tests to interact with checkbox menu items
- Remove Switch components in favor of PatternFly checkbox menu items
- All tests passing (10/10)

Co-authored-by: Claude <noreply@anthropic.com>

* resolve test failures

Signed-off-by: Brady Pratt <bpratt@redhat.com>

* feat(ui): image label should be clickable if link (PROJQUAY-9593)

Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-22 12:34:31 -05:00
Harish Govindarajulu
de6af216b4 ui: Rewrite OAuthError component for React (PROJQUAY-9498) (#4383)
* Fix missing axios import

* Rewrite OAuth error for react to show a new error component

* Rewrite tests for OAuth flow

* Fix navigating to /signin from Headertoolbar

* replace url_for() with urlencode + add config setting for test suite

* Add checks before embedding redirect url + redesign OAUTH error screen
2025-10-22 13:14:17 -04:00
jbpratt
cccab923e9 chore: set popperProps for leaking dropdowns (#4387)
they were going off the right side of the screen previously, we can use
popperProps to center them nicely

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-10-22 13:40:38 +00:00
jbpratt
dc7675c3d8 fix(web): prevent infinite re-render loop in tags list (PROJQUAY-9595) (#4390)
Fixed infinite re-render loop caused by inline columns object creation.
The columns config was being recreated on every render, triggering
usePaginatedSortableTable recalculation, which created new sortedTags
reference, triggering manifest tracks useEffect, causing re-renders.

Memoized columns configuration with useMemo for stable reference.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-22 08:04:34 -05:00
jbpratt
bf24701ef3 feat(ui): add Information tab as default for repository view (PROJQUAY-9556) (#4386)
* feat(ui): add Information tab as default for repository view (PROJQUAY-9556)

Adds a new Information tab to the repository details page that displays:
- Repository description (editable for users with write permissions)
- Pull commands (podman and docker)
- Repository activity placeholder (to be implemented later)

The Information tab now appears first and is the default tab when viewing
a repository, replacing Tags as the default. This matches the behavior of
the old Angular UI and provides users with essential repository information
upfront.

Updated existing Cypress tests to navigate to the Tags tab explicitly where
needed, and added new tests to verify the Information tab is the default.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* feat(ui): add markdown rendering for repository descriptions (PROJQUAY-9556)

Repository descriptions now support markdown formatting including:
- GitHub Flavored Markdown (headings, lists, links, etc.)
- Code blocks with syntax highlighting and copy-to-clipboard functionality
- Tables styled with PatternFly components
- Inline code formatting

This restores markdown capability that existed in the legacy UI and uses
the same react-markdown implementation pattern as ModelCard. The edit
mode now indicates markdown support to guide users.

Co-authored-by: Claude <noreply@anthropic.com>

* refactor(ui): use PatternFly design tokens for markdown styling (PROJQUAY-9556)

Replaces hardcoded inline styles with CSS classes using PatternFly design
tokens for better consistency with the design system:

- Inline code: Uses global BackgroundColor, spacer, BorderRadius, and
  FontFamily tokens
- Table cells: Uses global BorderColor and spacer tokens

This improves theme consistency and makes the styling more maintainable
by leveraging the PatternFly design system instead of magic values.

Also adds TypeScript types to MarkdownCodeBlock event handlers for better
type safety.

Co-authored-by: Claude <noreply@anthropic.com>

* clean up additional tests

Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-21 14:07:36 -04:00
jbpratt
6ac9dc05d3 feat(ui): read only settings mode and modal for token generation (PROJQUAY-9209) (#4381)
* feat(ui): read only settings mode and modal for token generation (PROJQUAY-9209)

add read only settings mode and a modal for different provider token
generation

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(ui): correct readonly state check property path (PROJQUAY-9209)

fixes readonly mode checks to use correct API response property path.
the API returns registry_state at root level (lowercase), but code was
checking config.REGISTRY_STATE (uppercase, nested). this caused readonly
mode to never activate, allowing users to see Settings tab and modify
build triggers when registry was in readonly mode.

changes registry_state checks in 5 files:
- Organization.tsx: Settings/Robot accounts tab visibility
- TagHistory.tsx: readonly mode detection
- BuildHistory.tsx: Start New Build button visibility
- BuildTriggers.tsx: build trigger toggle visibility
- BuildTriggersInactiveTriggerRow.tsx: delete trigger link visibility

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-20 20:11:57 +00:00
jbpratt
a092721b73 feat(ui): add footer links to login page (PROJQUAY-9152) (#4378)
* feat(ui): add footer links to LoginPage and CreateAccount (PROJQUAY-9152)

Adds configurable footer links (Terms of Service, Privacy Policy, Security,
About, Documentation) to the signin and create account pages using PatternFly's
LoginPage footerListItems prop. Creates a reusable useLoginFooterItems hook that
reads footer configuration from FOOTER_LINKS config.

Co-authored-by: Claude <noreply@anthropic.com>

* refactor(ui): extract LoginPageLayout to eliminate duplication (PROJQUAY-9152)

This extracts common LoginPage configuration into a reusable LoginPageLayout
component, eliminating ~27 lines of duplication between CreateAccount and Signin.

The component encapsulates logo URL logic, footer items hook, document.title
effect, and all LoginPage props. Also moves brand CSS to LoginPageLayout.css
to fix logo sizing.

Fixes bugs: CSS typo in CreateAccount (pdf-u- → pf-u-) and missing document.title.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-17 09:02:29 -05:00
Shubhra Deshpande
49ff0da0c2 feat: Added Redis database and Redis flush worker (PROJQUAY-7176) (#4321)
* Added redis database and redis flush worker

* updated digest validation

* adding test coverage for scan_keys function

* adding test coverage

* added tests for scan function

* added coverage for flush to database function

* added coverage for gnuicorn worker initialization

* Replaced mock methods in the test with actual function calls

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-10-17 09:27:11 -04:00
jbpratt
6c448cc915 ui: Add account settings to the new UI (PROJQUAY-9209) (#4367)
* ui: Add account settings to the new UI (PROJQUAY-9209)

- avatar functionality
- handle current logged in user avatar
- change pw
- change account type
- enable notifications
- delete account
- CLI config
- use react-hook-form
- fix checkbox state with modal
- fixes user save and lazy loads settings tab
- add e2e tests
- fix other tests failing on CI

* fix(web): address PR review feedback for user settings

- Add success alert and redirect after account conversion
- Fix error handling in ChangeAccountTypeModal
- Remove duplicate account conversion UI from BillingInformation
- Add conditional rendering for CLI auth types in CLIConfiguration
- Fix AlertVariant import in ChangeAccountTypeModal

Co-authored-by: Claude <noreply@anthropic.com>

* feat(web): add account settings link to user dropdown menu

Add a new "Account Settings" menu item to the user dropdown in the
header toolbar, making it easier for users to access their settings.

- Import UserCogIcon for the settings icon
- Add navigation handler for account-settings itemId
- Add Account Settings MenuItem before Logout in Actions menu group
- Navigate to /organization/{username}?tab=Settings when clicked

Co-authored-by: Claude <noreply@anthropic.com>

* fix(web): restore data-testid and fix Quota tab content in Settings

Recent account settings changes (7e864bbc) broke all quota.cy.ts tests by:
1. Removing data-testid attribute from Tab components
2. Using JSX instead of function for Quota tab content

This restores data-testid={tab.name} to enable test selectors and wraps
the Quota content in an arrow function to match other tabs.

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: mfrances <mfrances@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-17 13:01:39 +00:00
jbpratt
1be2da4296 chore: skip flaky ui signin test (#4379)
to unblock automerges

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-10-17 07:58:05 -04:00
jbpratt
7909f6009c feat(ui): add manifest layers tab to tag details (PROJQUAY-9269) (#4364)
* ui: Add Manifest Layers tab to Tag Details in new UI (PROJQUAY-9269)

* fix(ui): address feedback for manifest layers feature (PROJQUAY-9269)

- Accessibility: Add ARIA labels and semantic HTML to layer components
- Error handling: Display error state when manifest fetch fails
- Performance: Memoize layer reversal operation
- Fix typo in UseImageSize variable name
- Improve React key generation to avoid undefined keys
- Remove redundant key prop in LabelsReadOnly
- Add missing dependency to useEffect in TagDetails

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(ui): prevent security state reset on URL param changes (PROJQUAY-9269)

Split useEffect into two separate effects to avoid clearing cached security
data when URL parameters change. Previously, adding a digest parameter (e.g.,
clicking vulnerability counts) would trigger a full state reset, causing the
Security Report and Packages tabs to show loading spinners indefinitely.

Now security state only resets when navigating to a different tag (org/repo/tag
changes), not when URL search params change. This preserves cached security
data when switching between tabs with URL parameters.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* fix(ui): ensure unique keys for layers with duplicate blob digests (PROJQUAY-9269)

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: mfrances <mfrances@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-16 11:24:42 -04:00
jbpratt
8f7036dd09 feat(ui): display Cosign shield icon for signed tags (PROJQUAY-9579) (#4372)
Add visual indicator for Cosign-signed tags in React UI to match
Angular UI functionality. Tags signed with Cosign now display a
shield icon next to the tag name with a tooltip.

Implementation:
- Add cosign_signature_tag fields to Tag interface
- Create client-side Cosign signature detection utilities
- Scan tags for pattern sha256-[digest].sig and map to signed manifests
- Display PatternFly shield icon inline with signed tags
- Add Cypress test for icon visibility

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-16 10:00:25 -05:00
Harish Govindarajulu
f63d25bdd3 nginx: Add nginx routing logic to default to react UI for downstream (PROJQUAY-9207) (#4252)
* Add ngnix routing logic to default to react UI for downstream

* Remove defaulting from env, update Makefile to build react by default for local

* Add cypress test for signin and create account workflow

* Add missing routes + fallback to backend server

* Hide UI toggle when defaulting to new UI

* Adds forgot password + recovery email, recaptcha, missing login checks

* Add external login screen + support for other login types for new UI

* Add new screen for update user after external login

* Add authorized apps section under external logins tab

* Implement updateuser react component + fix cypress test

* Fix external login OAuth flow for react

* switch logic to default to new ui

* Add DEFAULT_UI: angular to config for cypress CI

* Fix cypress tests for oauth-callback

* Rebase and fix merge conflicts

---------

Signed-off-by: harishsurf <hgovinda@redhat.com>
2025-10-14 15:10:39 -04:00
jbpratt
cfa7269777 ui: fix Popper positioning in FilterInput advanced search (PROJQUAY-9272) (#4359)
* ui: fix Popper positioning in FilterInput advanced search (PROJQUAY-9272)

The advanced search panel with "Use regular expressions" checkbox was not
appearing in the correct position. The Popper component was being appended
to the SearchInput element itself, causing CSS positioning issues where the
panel would overlay on top of the search input instead of appearing below it.

Fixed by implementing the containerRef pattern (matching Menu.tsx):
- Added containerRef to wrap SearchInput and Popper in a container div
- Changed appendTo from querySelector to containerRef.current
- Simplified Popper props to minimal working set (triggerRef, popper,
  isVisible, appendTo)
- Removed invalid props for PatternFly 5 Popper API

The panel now correctly appears below the advanced search button and the
checkbox toggles regex mode as expected.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

* Revert "ui: mark regex search test as skipped (PROJQUAY-9272) (#4342)"

This reverts commit c725d025e3.

* feat(ui): show empty on empty results

when filtering in non-regex mode - using a special character that
doesn't match anything causes the no repos available (permissions) page
to show. Instead, show the search bar with empty results

Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-14 13:05:14 -05:00
jbpratt
427107dd47 ui: add show/hide signatures toggle for tags view (PROJQUAY-7019) (#4334)
this adds functionality to filter out cosign signature tags (.sig),
SBOM tags (.sbom), and attestation tags (.att) from the tags list.
users can toggle visibility with a button in the toolbar, matching
the behavior from the angular UI. when repositories contain many tags
with signatures (1K+), this prevents UI cluttering by hiding signature
artifacts by default.

implementation:
- added showSignaturesState recoil atom to track toggle state
- added isCosignSignatureTag() utility to detect signature patterns
- added "Show/Hide Signatures" button to tags toolbar
- signature tags are hidden by default (showSignatures: false)
- filter applied before pagination and sorting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-14 11:02:04 -05:00
jbpratt
8de588929e chore: npm audit fix (#4363)
from:

`30 vulnerabilities (5 low, 7 moderate, 16 high, 2 critical)`

to:

10 vulnerabilities (4 moderate, 6 high)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-10-14 08:31:46 -05:00
jbpratt
2b942639b9 feat(ui): display customized REGISTRY_TITLE (PROJQUAY-9525) (#4360)
set the REGISTRY_TITLE if available, default to `Quay` otherwise. Update
it to match in both the signin and root pages

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-10-13 15:22:28 -05:00
jbpratt
c725d025e3 ui: mark regex search test as skipped (PROJQUAY-9272) (#4342)
the test is broken, marking as skipped until the feature is worked on to
fix regex searching

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-10-10 09:09:06 -04:00
jbpratt
32f61efe8a ui: show custom REGISTRY_TITLE on login page (PROJQUAY-9461) (#4333)
the old UI shows this value in the login/sign in button

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-10-08 16:42:49 +00:00