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

12546 Commits

Author SHA1 Message Date
Harish Govindarajulu
a7d01d052d fix(ui): Add "Requires fresh login" checks for superuser operations (PROJQUAY-9658) (#4451)
* fix(ui): show password verification for take ownership (PROJQUAY-9658)

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

* fix(ui): add fresh login verification to superuser operations (PROJQUAY-9658)

  Implemented password verification modal for sensitive superuser operations
  that require fresh login. Added fresh login handling to:
  - Delete organization
  - Rename organization
  - Delete user
  - Create user
  - Change user password
  - Change user email

  Also fixed UseCreateUser hook to pass error object instead of string
  to enable fresh login detection.

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

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

* fix(ui): implement global fresh login with request queuing (PROJQUAY-9658)

Replaced component-level fresh login handling with centralized axios
interceptor approach. All failed requests due to fresh login requirement
are now queued and automatically retried after password verification.

- Add axios interceptor to catch 401 fresh_login_required globally
- Implement request queuing mechanism for pending operations
- Add global FreshLoginModal at app root level
- Remove component-level useFreshLogin hook from all modals
- Close operation modals immediately after submit (request queued if needed)
- Add fresh login support for quota management operations

* Add Cypress tests for fresh login flow (6 tests)

* Address code rabbit reviews

* fix(ui): handle fresh login password verification errors

- Display error toast when wrong password entered in verification modal
- Add centralized fresh login error filtering utility
- Add Cypress tests for wrong password and retry scenarios

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-18 05:23:35 +05:30
jbpratt
92eddf2dbc chore: add create-plan-from-issue CC command (#4531)
add a claude code command to analyze a jira issue and create a plan from
it. This should be used in plan mode!

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-17 11:44:34 -05:00
Harish Govindarajulu
1863c05213 fix(ui): Add infinite scroll and load more button to usage logs (PROJQUAY-9717) (#4525) 2025-11-17 21:14:39 +05:30
Harish Govindarajulu
decd22c425 fix(ui): Add missing operation types to usage logs chart (PROJQUAY-6881) (#4530)
* fix(ui): Add missing operation types to usage logs chart (PROJQUAY-6881)

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

* Apply suggestion from @coderabbitai[bot]

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Signed-off-by: harishsurf <hgovinda@redhat.com>
Co-authored-by: jbpratt <jbpratt78@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-11-17 20:54:43 +05:30
jbpratt
d972f3690d chore: remove prop-types dependency usage in favor of TypeScript types (#4510)
Converted all remaining prop-types usage to TypeScript interfaces:
- SystemStatusBanner: Added BannerContentProps interface
- DateTimePicker: Added DateTimePickerProps interface

prop-types remains as transitive dependency but is no longer directly
imported or used in the codebase.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-17 03:16:47 -06:00
Harish Govindarajulu
1541a5beaf fix(ui): Remove local dev test configs (PROJQUAY-9753) (#4520)
ui: Remove local dev test configs (PROJQUAY-9774)
2025-11-14 21:25:47 +05:30
Shubhra Deshpande
3d2248d723 pullstats: updated bulk upsert function to track correct pull count and timestamp in case of race condition (PROJQUAY-9684) (#4463)
pullstats: updated bulk upsert function to track correct pull count and timestamp in case of race condition

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-11-14 09:48:23 -05:00
Brandon Caton
1b2649b3d2 ui: fixing redirect on org deletion (PROJQUAY-9742) (#4514) 2025-11-14 09:22:14 -05:00
Naman Sharma
e0c4393f2b deps: updated axios version to 1.12.0 (PROJQUAY-9420) (#4429)
updated axios version to 1.12.0
2025-11-14 17:40:42 +05:30
Shubhra Deshpande
6df17ffecf bug: removing console warnings from repository page and usagelogs (PROJQUAY-9648) (#4426)
bug: removing console warnings from repository page and usagelogs

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-11-13 11:11:29 -05:00
jbpratt
24f3cd31f9 chore: enable FEATURE_UI_V2 as default (#4511)
show the switch to toggle UI

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-13 15:07:06 +00:00
Dave O'Connor
2511b45e89 fix(api): superuser panel access without SUPERUSERS_FULL_ACCESS (PROJQUAY-9693) (#4455)
fix(api): implement proper superuser permission model and fix access controls

Fixes multiple issues with superuser functionality and implements a comprehensive
permission model for FEATURE_SUPERUSERS_FULL_ACCESS:

**Permission Model:**
- Global Readonly Superusers (auditors): Always have read access to all content,
  independent of FEATURE_SUPERUSERS_FULL_ACCESS setting
- Regular Superusers: Can access /v1/superuser endpoints and their own content.
  Require FEATURE_SUPERUSERS_FULL_ACCESS=true for cross-namespace read access
- Full Access Superusers: Regular superusers with FULL_ACCESS enabled, can
  perform CRUD on content they don't own
- Write operations: Only allowed for full access superusers (global readonly
  superusers never get write access)

**Key Fixes:**
1. Fixed superuser panel endpoints returning 403 when FULL_ACCESS was disabled.
   Basic panel operations (user list, logs, org list, messages) now work with
   just FEATURE_SUPER_USERS enabled.

2. Updated decorators to properly differentiate between basic superuser
   operations and permission bypass operations.

3. Implemented license bypass: Superusers with FULL_ACCESS now bypass
   license/quota limits when creating or modifying private repositories.

4. Fixed 18 permission checks across 7 files to properly implement cross-namespace
   access controls for different superuser types.

**Changes:**
- endpoints/api/__init__.py: Fixed allow_if_superuser(), require_repo_permission, and decorators
- endpoints/api/superuser.py: Updated SuperUserAppTokens permission check
- endpoints/api/organization.py: Updated 4 GET endpoints to require FULL_ACCESS
- endpoints/api/namespacequota.py: Updated 2 GET endpoints to require FULL_ACCESS
- endpoints/api/team.py: Updated 2 GET endpoints to require FULL_ACCESS
- endpoints/api/prototype.py: Updated 1 GET endpoint to require FULL_ACCESS
- endpoints/api/policy.py: Updated auto-prune policy endpoints
- endpoints/api/robot.py: Updated robot endpoints
- endpoints/api/build.py: Updated repository build logs
- endpoints/api/repository.py: Added license bypass for superusers with FULL_ACCESS
- endpoints/api/repository_models_pre_oci.py: Updated repository visibility query
- endpoints/api/logs.py: Fixed log access to require FULL_ACCESS for permission bypass
- endpoints/api/test/test_superuser_full_access.py: Added comprehensive test suite
- endpoints/api/test/test_appspecifictoken.py: Updated test mocking and added 403 test
- test/test_api_usage.py: Updated test expectations for license bypass behavior

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 09:38:11 -05:00
jbpratt
573a03e98b fix(web): hide Create User button for external authentication in superuser panel (PROJQUAY-9736) (#4495)
* fix(web): hide Create User button for external authentication in superuser panel (PROJQUAY-9736)

When Quay is configured with external authentication (LDAP, OIDC, etc.),
the Create User button is now hidden in the superuser Organizations page
and replaced with an informational alert explaining that users can only
be created in the external authentication system. This matches the
behavior of the old AngularJS UI and prevents the confusing error that
occurred when users clicked the button.

Changes:
- Conditionally render Create User button only for Database auth
- Add PatternFly Alert for external auth with user-friendly message
- Add Cypress tests covering Database, LDAP, OIDC, and AppToken auth types

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

* chore: drop proptypes use in orgs list

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

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-12 15:37:27 -06:00
jbpratt
d7bf0f37fd fix(web): hide change email/password for external auth in superuser panel (PROJQUAY-9747) (#4503)
When AUTHENTICATION_TYPE is LDAP or other external auth (not Database),
the superuser user management panel now correctly hides "Change E-mail Address"
and "Change Password" options from the user actions menu. These options are only
shown for Database authentication since external auth users are managed in the
external system.

Also hides "Send Recovery E-mail" option for external auth as it only works
with Database authentication.

Adds Cypress tests to verify correct behavior for LDAP, OIDC, and Database
authentication types.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-12 08:07:35 -06:00
jbpratt
1456811891 chore: add ldap dev config (#4497)
add an ldap container that creates users and the quay config to utilize it

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-11 22:41:24 +00:00
jbpratt
42775d4d9d fix(web): use correct API endpoints for user namespace quota limits (PROJQUAY-9730) (#4494)
Superusers could not add/update/delete quota limits for user namespaces
because the React UI was calling non-existent /api/v1/superuser/users/
endpoints instead of the correct /api/v1/organization/ endpoints.

The backend only provides /api/v1/organization/{namespace}/quota/*
endpoints which work for both organizations AND user namespaces. The
Angular UI correctly used these endpoints for all cases, but the React
UI incorrectly tried to use separate /api/v1/superuser/users/ endpoints
for user namespaces, resulting in HTTP 405 Method Not Allowed errors.

Changes:
- QuotaResource.ts: Removed isUser conditional logic from createQuotaLimit,
  updateQuotaLimit, and deleteQuotaLimit functions - now always use
  /api/v1/organization/ endpoints
- UseQuotaManagement.ts: Updated hooks to remove isUser parameter from
  quota limit function calls

🤖 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-11 16:23:32 -06:00
jbpratt
2f9c862fe7 fix(web): redirect to username confirmation page after LDAP login (PROJQUAY-9735) (#4500)
When logging in with LDAP authentication, the new React UI was skipping the
username confirmation page and going directly to the Organizations page. This
fix ensures that users with the confirm_username prompt are redirected to the
/updateuser page after successful login.

Changes:
- Modified Signin.tsx to check for user prompts after successful login
- Added redirect to /updateuser if prompts exist
- Enhanced UpdateUser.tsx to honor quay.redirectAfterLoad for external logins
- Added Cypress e2e tests for username confirmation flow

🤖 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-11 16:21:21 -06:00
jbpratt
577b017251 fix(web): show correct error when email verification required (PROJQUAY-9661) (#4489)
when user with unverified email attempts login, display "You must verify
your email address before you can sign in" instead of misleading "CSRF
token expired - please refresh" error

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-10 11:44:20 -05:00
jbpratt
8aec3c0d39 chore: bump mypy python_version to 3.12 (#4490)
Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-10 09:29:00 -06:00
jbpratt
51c9056c24 chore: setup surge previews (#4485)
Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-07 22:34:49 +00:00
jbpratt
c27f9b1337 chore: ctrf cypress reporting (#4486)
* chore: set up CTRF cypress reporting

generate and upload cypress test results to PRs using CTRF (common test
report format)

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

* chore: set up multi workflow ctrf pr reporting

and simplify the uploading into 2 stages

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

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-07 16:02:37 -06:00
Daniel Messer
b37b57e61f chore(build): avoid npm caches in images when building locally (PROJQUAY-9604) (#4482)
avoid npm caches in images

Signed-off-by: dmesser <dmesser@redhat.com>
2025-11-07 13:38:31 -05:00
jbpratt
0630a7fcc3 fix(web): display backend error message for INVITE_ONLY_USER_CREATION (PROJQUAY-9503) (#4458)
When INVITE_ONLY_USER_CREATION is enabled and a valid LDAP user attempts
to login without an existing Quay account, the frontend now displays the
proper error message from the backend: "User creation is disabled. Please
contact your administrator to gain access."

Previously, the frontend hardcoded "Invalid login credentials" regardless
of the actual error message returned by the backend, which was misleading.

Changes:
- Use backend error message instead of hardcoded string in Signin.tsx
- Add Cypress test for INVITE_ONLY_USER_CREATION error scenario
- Fix existing test to align with new behavior

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-07 10:33:05 -06:00
jbpratt
5270a2c6c2 chore: migrate SidebarState and AlertState from Recoil to React Context (#4445)
Migrates UI state management from Recoil atoms to a centralized
UIContext using pure React Context API. This is part of the broader
effort to simplify state management and reduce dependencies.

Changes:
- Create UIContext with sidebar and alert state management
- Migrate SidebarState: isSidebarOpen with localStorage persistence
- Migrate AlertState: alerts array with add/remove/clear operations
- Move AlertVariant enum and AlertDetails interface to UIContext
- Remove UseAlerts hook (now redundant - consumers use useUI directly)
- Update Alerts component to use removeAlert from context
- Update QuayHeader and QuaySidebar to use useUI hook
- Update 128 files to import types/hooks from UIContext
- Delete AlertState.ts, SidebarState.ts, and UseAlerts.ts

Benefits:
- Zero runtime logic changes for consumers
- Centralized UI state in single context
- Reduced Recoil surface area (2 fewer atoms)
- Simpler architecture (removed unnecessary hook wrapper)
- Future-proof for additional UI state (theme, plugin mode)
- Pure React with no external dependencies for UI state

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-06 17:21:06 -05:00
jbpratt
12e0c0926f chore: add web/AGENTS.md (#4478)
to help guide dev and coderabbit reviews. Claude users can symlink the
file or mention the file to have it loaded

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-06 12:51:23 -06:00
jbpratt
ac5298f679 fix(ui): consolidate credential modals and fix state management issues (PROJQUAY-9630) (#4472)
- Rename ApplicationTokenCredentials to CredentialsModal for reusability
- Add support for both application tokens and encrypted passwords
- Fix memory leak by moving state cleanup to useEffect
- Fix error handling to clear errors on successful responses
- Add null checks for user loading state
- Update data-testid naming for better specificity
- Mock encrypted password API in Cypress tests
- Simplify Cypress selectors for better reliability

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-06 11:08:38 -05: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
Sharpened Blade
d31e30a3f7 proxy: Drop error 403 token requests for anonymous pulls (PROJQUAY-9012) (#4235)
* proxy: Drop error 403 token requests for anonymous pulls (PROJQUAY-9012)

ghcr.io returns 403 when attempting an anonymous pull, which causes the
proxy to attempt authentication even when authentication is disabled.
This change ignores 403 status codes when requesting anonymous pulls,
similar to the existing behavior for 401 responses.

* fix formatting
2025-11-04 10:46:17 -05: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
Jordi Piriz
2a279dfe61 deploy: remove GRPC service from the deployment template (PROJQUAY-0000) (#4440)
Remove GRPC service from the deployment template
2025-11-03 11:01:16 -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
Jordi Piriz
747d1694cd revert: tracing improving otlp handling (PROJQUAY-8902) (#4438)
Revert "tracing: improving otlp handling (PROJQUAY-8902) (#4198)"

This reverts commit 89e758846f.
2025-11-03 16:17:32 +01: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
Shubhra Deshpande
aa1188024d sentry: added additional filtering for sentry events (PROJQUAY-9436) (#4418)
* sentry: added additional filtering for sentry events


---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-10-31 09:42:23 -04: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
Asgeir Storesund Nilsen
d0f45ad375 notifications: Support slash in repository names (PROJQUAY-7538) (#3778)
* notifications: Support slash in repository names (PROJQUAY-7538)

Fix for PROJQUAY-7538 discussed in #3069 by only considering the first slash when separating namespace and repository.

* Test and devcontainer

* Remove devcontainer.json

* Revert irrelevant test change.
2025-10-30 09:53:46 -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
Shubhra Deshpande
57101500ea bug: fixing pull statistics Redis flush worker with aggregation support (PROJQUAY-9607) (#4407)
* fixing pull statistics Redis flush worker with aggregation support

---------

Co-authored-by: shudeshp <shudeshp@redhat.com>
2025-10-29 15:23:39 -04:00