UX 870 remove core stat from mobx#2220
Open
jvorcak wants to merge 194 commits intorefactor/remove-mobx-from-quotas-pagefrom
Open
UX 870 remove core stat from mobx#2220jvorcak wants to merge 194 commits intorefactor/remove-mobx-from-quotas-pagefrom
jvorcak wants to merge 194 commits intorefactor/remove-mobx-from-quotas-pagefrom
Conversation
…odel selection Add comprehensive AI Gateway integration to Console UI with the following features: - **Gateway Selection**: Fetch and display available AI Gateways from AI Gateway API - Auto-select first available gateway when creating agents - Show gateway ID in agent configuration details - **Dynamic Provider Loading**: Fetch LLM providers from AI Gateway ListModelProviders API - Replace hardcoded provider list with dynamic data - Display provider logos from API response - **Dynamic Model Loading**: Fetch models from AI Gateway ListModels API - Filter models by selected provider - Auto-select first model when provider changes - Show model metadata (context window, description) - **Dual-Mode Support**: - AI Gateway mode: Use gateway for auth, dynamic providers/models, hide API key field - Legacy mode: Use API key, hardcoded providers/models (backward compatible) - **Feature Flag**: enable-api-key-configuration-agent - false (default): AI Gateway mode with dynamic data - true: Legacy mode with hardcoded providers and API key requirement - **API Integration**: - Add buf.build/redpandadata/ai-gateway dependency - Generate TypeScript types for Gateway, ModelProviders, and Models services - Create React Query hooks with proper caching and authentication - Configure dev server proxy for AI Gateway API (/.redpanda/api/redpanda.api.aigateway.v1) - **Validation**: - API key optional when gateway is configured (proto updated with ignore = IGNORE_IF_ZERO_VALUE) - Gateway required when available - Conditional validation based on mode - **UX Improvements**: - No layout shift: gateway field always visible (disabled when unavailable) - Loading states for gateway/provider/model dropdowns - No validation errors during loading transitions - Icons displayed for providers in both selected state and dropdown Technical details: - Proto generation includes AI Gateway v1 API from buf.build - Proxy configuration in both Console UI and Cloud UI to handle CORS - Custom transport for AI Gateway with bearer token authentication - React Query caching with staleTime to prevent excessive refetching Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
…d in initialValues - Add isLoadingGateways to LLMConfigSectionProps interface - Remove duplicate gatewayId property from initialValues object Fixes TypeScript compilation errors.
- Run Biome formatter to fix import ordering and code style - Change pageSize from 1000 to 100 for gateway queries - Rename useLegacyApiKeyMode to isLegacyApiKeyMode (non-hook variable) - Clarify proxy configuration supports both Console backend and AI Gateway - Update useEffect dependencies for exhaustive deps check
removed push triggers directly on backend verify and frontend verify Backend ci improved from ~9min to ~4min 🚤 created a new job to handle edge case for forked repos
…gateway display Add comprehensive AI Gateway support across agent lifecycle: - Display gateway info on agent details page (read-only field) - Load providers and models from AI Gateway API on edit screen - Hide API token field when agent uses gateway (create and edit) - Strip API-specific prefixes from provider and model names - Auto-select first enabled provider and model in create mode - Configure console dev server on port 3004 for module federation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove staleTime, gcTime, refetchOnWindowFocus, refetchOnMount, and refetchOnReconnect options from AI Gateway query hooks as these should be configured at the global query client level per code review feedback.
When enableApiKeyConfigurationAgent feature flag is enabled, the edit screen will now use legacy behavior (hardcoded providers/models, no AI Gateway API calls) even if the agent was originally created with a gateway. This ensures consistent behavior across create and edit screens when the feature flag is enabled.
This: - splits instant and range queries. - removes the step input argument. - makes the value optional in data points. - add comments
This: - renames labels into tags - adds a filter on tags Pagination looks to much for this, the user can't add queries.
- Add isLoadingGateways to gateway Select disabled state and placeholder - Remove unused detectProvider import - Add non-null assertions for aiAgent in useMemo and handleSave - Fix provider type checking with explicit null check - Convert selectedProvider to boolean with !! in hasNoModels Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This: - adds protovalidate annotations for input - make it explicit when using optional values
These auto-generated protobuf files were importing from the wrong package (go.panda.dev/redpanda-aigw instead of local console imports), causing golangci-lint to fail. These files belong to the redpanda-aigw repository, not the console repository. The frontend AI Gateway integration uses TypeScript protobuf files generated separately and doesn't need these backend Go files. Fixes golangci-lint error: no export data for "go.panda.dev/redpanda-aigw/protos/gen/redpanda/api/aigateway/v1" Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Addresses code review comments from @malinskibeniamin: 1. [MAJOR] Add select/transform to query hooks - Add transformModelProviders with PROVIDER_PREFIX_REGEX to strip "model_providers/" prefix - Add transformModels with MODEL_PREFIX_REGEX to strip "models/provider/" prefix - Move data parsing from component layer to query hooks using select option - Update return types to use ReturnType<typeof transform> for type safety 2. Make filter parameter optional - Use conditional spread: ...(input?.filter && { filter: input.filter }) - Don't provide filter/orderBy if not specified - Applies to both listModelProviders and listModels requests 3. Simplify component data mapping - Remove duplicate prefix stripping logic from llm-config-section.tsx - Use transformed data directly from query hooks - Cleaner separation of concerns: queries handle data transformation, components handle presentation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit addresses all code review comments on PR #2175: 1. Revert rsbuild port configuration (frontend/rsbuild.config.ts:51) - Removed hardcoded port: 3004 - Use `bun run start` for enterprise or `bun run start2 --port=3004` for Module Federation 2. Split ai-gateway.tsx into separate files (frontend/src/react-query/api/ai-gateway.tsx:1) - Created ai-gateway/model-providers.tsx for useListModelProvidersQuery - Created ai-gateway/models.tsx for useListModelsQuery - Kept ai-gateway.tsx for useListGatewaysQuery only - Added documentation about AI Gateway transport requirement at top of each file 3. Remove pageSize override in component (frontend/src/components/pages/agents/create/ai-agent-create-page.tsx:84) - Removed pageSize: 100 from useListGatewaysQuery call - Now uses AI_GATEWAY_DEFAULT_PAGE_SIZE (50) from hook 4. Update imports in consuming components - Updated llm-config-section.tsx to import from separate files - Updated ai-agent-configuration-tab.tsx to import from separate files Note: The [nit] comment about nested ternary operators (line 326) is acknowledged and will be addressed in a subsequent PR as suggested. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
When switching providers (e.g., OpenAI to Anthropic), the model dropdown briefly showed a blank value while new models were loading. This happened because the old model value remained in the form field but didn't match any models in the empty filteredModels array during loading. Fix: Clear the model field when provider changes and models are loading or unavailable. This ensures the "Loading models..." placeholder is visible instead of a blank dropdown, providing better UX feedback during provider switching. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Biome formatting fixes: - Fix line breaks for long ternary expressions - Convert double quotes to single quotes for consistency - Format multi-line object property access UX improvements: - Clear model field when provider changes to show "Loading models..." placeholder - Use undefined instead of empty string for Select value to properly trigger placeholder - Prevents blank dropdown when switching providers during model loading Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
api: new dataplane observability v1alpha3
* fix: handle FailedPrecondition in shadow links route loader * fix: remove ShadowLinkService from HIDE_IF_NOT_SUPPORTED_FEATURES Shadow Links should remain visible in the sidebar even when the feature is disabled so users can see instructions on how to enable it. The loader try-catch handles FailedPrecondition gracefully for disabled clusters. * fix: hide shadow links tab on non-Redpanda clusters * fix: show distinct unavailable state for shadow links on non-Redpanda clusters Non-Redpanda clusters (e.g. Apache Kafka) return Code.Unavailable because the Redpanda Admin API doesn't exist. Previously this showed the same FeatureDisabled card with an `rpk` command, which is incorrect for these clusters. Add a separate ShadowLinkUnavailableState with an info alert explaining that shadowing requires a Redpanda cluster with the Admin API. --------- Co-authored-by: Martin Schneppenheim <23424570+weeco@users.noreply.github.com>
observability: new page based on dataplane observability API
…nings Trim AGENTS.md, split oversized SKILL.md files into focused entrypoints with reference files, and delete/merge redundant rules. - AGENTS.md: 86 → 47 lines (remove discoverable patterns, add verify cmd) - e2e-tester SKILL.md: 725 → 80 lines (split into 3 reference files) - form-refactorer SKILL.md: 252 → 77 lines - Delete 15 rules (basic JS, linter-enforced, merged overlaps) - Fix factual errors (wrong utility names, Next.js assumptions) - Remove inert `globs` from skill rules (not supported there) - Add .claude/rules/test-unit-vs-integration.md (paths auto-loading) - Add noRestrictedImports warnings to biome.jsonc for legacy packages
Apply Go 1.26's `go fix` modernizers across the backend: - new(expr): replace kmsg.StringPtr() with builtin new() - forvar: remove redundant loop variable copies (Go 1.22+) - slicescontains: replace manual loops with slices.Contains() - mapsloop: replace map copy loops with maps.Copy() - stringscut: replace HasPrefix+TrimPrefix with strings.CutPrefix() - minmax: replace if-else clamping with builtin min()/max() - rangeint: replace 3-clause for loops with range-over-int - waitgroupgo: replace Add(1)+go+Done() with sync.WaitGroup.Go() - testingcontext: replace manual context.WithCancel with t.Context() - omitempty: remove no-op omitempty on struct-typed fields
Go 1.26's stricter go vet catches %q format verb misuse on integer types. Fix by using %d for numeric error codes and %q on the original string inputs for user-facing parse error messages.
Update all Go-specific tools to their latest releases: Taskfiles: - golangci-lint: 2.4.0 → 2.10.1 - goimports (x/tools): v0.33.0 → v0.42.0 - gofumpt: 0.8.0 → 0.9.2 - gci: 0.13.6 → 0.13.7 - go-licenses: 1.6.0 → 2.0.1 (module path updated to /v2) - tparse: 0.13.2 → 0.18.0 - gomock: 0.4.0 → 0.6.0 - ifacemaker: 1.2.1 → 1.3.0 - buf: 1.54.0 → 1.65.0 - yq: 4.42.1 → 4.52.4 - connect-gateway: 0.11.0 → 0.12.0 - protoc-gen-connect-go: 1.18.1 → 1.19.1 - redpandadata/connect: 4.34.0-ai → 4.80.1-ai Workflows: - golangci-lint version in CI: v2.4 → v2.10 golangci-lint 2.10 config adjustments: - Disable new revive rules: identical-switch-branches, package-directory-mismatch, deep-exit - Exclude new gosec rules: G117, G704, G705 (false positives) - Fix remaining use-waitgroup-go lint findings - Remove stale nolint directives
The nolintlint linter has a known cache-related bug (golangci/golangci-lint#3228) that causes false positives, intermittently reporting valid //nolint directives as unused in CI.
backend: bump go-git dependencies
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / validate (pull_request).
|
backend: upgrade go-chi to latest version
|
|
||
| import { ConnectionErrorUI } from './misc/connection-error-ui'; | ||
| import { config as appConfig } from '../config'; | ||
| import { api } from '../state/backend-api'; | ||
| import { featureErrors } from '../state/supported-features'; | ||
| import { useSupportedFeaturesStore } from '../state/supported-features'; |
Contributor
There was a problem hiding this comment.
[Biome] reported by reviewdog 🐶
Suggested change
| import { useSupportedFeaturesStore } from '../state/supported-features'; |
Contributor
|
@jvorcak is this ready for review? looks like a lot of changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.