Feat/acm 32322 fleet search subscription#6444
Conversation
… to multicluster-sdk ACM-32322 — Add GraphQL subscription support to the multicluster-sdk. - useFleetSearchSubscription: wraps the generated useSearchSubscription Apollo hook; returns [latestEvent, loading, error]; skips the WebSocket connection when input is undefined. - useFleetSearch: one-shot query hook with optional real-time patching via useFleetSearchSubscription; handles INSERT/UPDATE/DELETE events; supports pagination through SearchInput.limit and SearchInput.offset. - Re-export SearchInput from src/types/search.ts so callers can type their input without reaching into internal packages. - Update src/api/index.ts and src/index.test.ts public-API guard. - Regenerate README.md API docs. Signed-off-by: zlayne <zlayne@redhat.com>
Verifies: - Search page loads and returns results via Apollo HTTP link - Search WebSocket proxy endpoint is reachable (WS transport for subscriptions) Signed-off-by: zlayne <zlayne@redhat.com>
Signed-off-by: zlayne <zlayne@redhat.com>
Signed-off-by: zlayne <zlayne@redhat.com>
Signed-off-by: zlayne <zlayne@redhat.com>
Signed-off-by: zlayne <zlayne@redhat.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zlayne The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds fleet-wide search hooks with optional GraphQL WebSocket updates. It extends search contracts and Apollo transport, applies subscription events to local query results, exposes new hooks and types, and updates tests and README documentation. ChangesFleet Search API
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Consumer
participant useFleetSearch
participant useSearchResultItemsQuery
participant useFleetSearchSubscription
Consumer->>useFleetSearch: provide SearchInput and subscriptionEnabled
useFleetSearch->>useSearchResultItemsQuery: execute base query
useSearchResultItemsQuery-->>useFleetSearch: return search items
useFleetSearch->>useFleetSearchSubscription: provide input when enabled
useFleetSearchSubscription-->>useFleetSearch: return FleetSearchEvent
useFleetSearch->>useFleetSearch: patch localData by operation and UID
useFleetSearch-->>Consumer: return data, loaded, error, refetch
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
frontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.test.ts (1)
5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
import typeforSearchInput.
SearchInputis used only as a type annotation (line 20).🔧 Proposed fix
-import { SearchInput } from '../types/search' +import type { SearchInput } from '../types/search'As per coding guidelines, "Use
import typefor type-only imports to avoid generating runtime imports."🤖 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 `@frontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.test.ts` at line 5, The import of SearchInput in useFleetSearchSubscription.test.ts is type-only and should not generate a runtime dependency. Update the top-level import in useFleetSearchSubscription.test.ts to use import type for SearchInput, and keep the existing type annotation usage in the test unchanged.Source: Coding guidelines
frontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.ts (1)
5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
import typefor type-only imports.
FleetSearchEventandSearchInputare used purely as types here.🔧 Proposed fix
-import { FleetSearchEvent, SearchInput } from '../types/search' +import type { FleetSearchEvent, SearchInput } from '../types/search'As per coding guidelines, "Use
import typefor type-only imports to avoid generating runtime imports."🤖 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 `@frontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.ts` at line 5, The import in useFleetSearchSubscription is type-only, so update the existing FleetSearchEvent and SearchInput import to use an import type form instead of a runtime import. Keep the symbol names the same and ensure any references in the hook remain type annotations only, so this module does not generate unnecessary runtime imports.Source: Coding guidelines
🤖 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 `@frontend/packages/multicluster-sdk/src/api/useFleetSearch.test.ts`:
- Line 2: Update the test setup in useFleetSearch.test to stop importing
renderHook and act from the archived `@testing-library/react-hooks` package.
Replace that import with the equivalents from `@testing-library/react`, and ensure
the rest of the test continues to use renderHook and act through the new source
so the React 18-compatible API is used consistently.
In `@frontend/packages/multicluster-sdk/src/api/useFleetSearch.ts`:
- Around line 122-137: The INSERT and UPDATE branches in useFleetSearch are
mutating latestEvent.newData in place, which should be avoided for Apollo
subscription payloads. Update the logic to copy latestEvent.newData into a new
object before setting cluster and _uid, then pass that copied object into
convertSearchItemToResource<T> in both branches. Keep the duplicate-check
behavior unchanged and apply the same non-mutating pattern consistently in the
UPDATE case.
In `@frontend/packages/multicluster-sdk/src/internal/search/search-client.ts`:
- Around line 25-27: The SSR fallback in search-client’s URL builder is
hardcoded and drops the BACKEND_URL prefix, making it inconsistent with the
httpEndpoint/httpLink path. Update the window-undefined branch in
search-client’s endpoint construction to derive the websocket URL from the same
BACKEND_URL-based prefix used elsewhere, so the SSR fallback resolves to the
correct /proxy/search route instead of ws://localhost/proxy/search.
---
Nitpick comments:
In
`@frontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.test.ts`:
- Line 5: The import of SearchInput in useFleetSearchSubscription.test.ts is
type-only and should not generate a runtime dependency. Update the top-level
import in useFleetSearchSubscription.test.ts to use import type for SearchInput,
and keep the existing type annotation usage in the test unchanged.
In `@frontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.ts`:
- Line 5: The import in useFleetSearchSubscription is type-only, so update the
existing FleetSearchEvent and SearchInput import to use an import type form
instead of a runtime import. Keep the symbol names the same and ensure any
references in the hook remain type annotations only, so this module does not
generate unnecessary runtime imports.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 3d6fff10-a4ca-4c9d-a783-76a9353a880f
📒 Files selected for processing (12)
frontend/packages/multicluster-sdk/README.mdfrontend/packages/multicluster-sdk/src/api/index.tsfrontend/packages/multicluster-sdk/src/api/useFleetSearch.test.tsfrontend/packages/multicluster-sdk/src/api/useFleetSearch.tsfrontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.test.tsfrontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.tsfrontend/packages/multicluster-sdk/src/index.test.tsfrontend/packages/multicluster-sdk/src/internal/search/convertSearchItemToResource.tsfrontend/packages/multicluster-sdk/src/internal/search/search-client.tsfrontend/packages/multicluster-sdk/src/internal/search/search-sdk.tsfrontend/packages/multicluster-sdk/src/internal/search/subscription.graphqlfrontend/packages/multicluster-sdk/src/types/search.ts
| if (typeof window === 'undefined') { | ||
| return 'ws://localhost/proxy/search' | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
SSR fallback URL drops the BACKEND_URL prefix.
httpEndpoint is ${BACKEND_URL}/proxy/search (e.g. /api/proxy/plugin/mce/console/multicloud/proxy/search), but the window === undefined fallback hardcodes 'ws://localhost/proxy/search', silently dropping the BACKEND_URL prefix. This makes the WS URL inconsistent with httpLink's URI whenever this branch is hit (e.g. non-jsdom test runs).
🔧 Proposed fix
if (typeof window === 'undefined') {
- return 'ws://localhost/proxy/search'
+ return `ws://localhost${httpEndpoint}`
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (typeof window === 'undefined') { | |
| return 'ws://localhost/proxy/search' | |
| } | |
| if (typeof window === 'undefined') { | |
| return `ws://localhost${httpEndpoint}` | |
| } |
🤖 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 `@frontend/packages/multicluster-sdk/src/internal/search/search-client.ts`
around lines 25 - 27, The SSR fallback in search-client’s URL builder is
hardcoded and drops the BACKEND_URL prefix, making it inconsistent with the
httpEndpoint/httpLink path. Update the window-undefined branch in
search-client’s endpoint construction to derive the websocket URL from the same
BACKEND_URL-based prefix used elsewhere, so the SSR fallback resolves to the
correct /proxy/search route instead of ws://localhost/proxy/search.
Signed-off-by: zlayne <zlayne@redhat.com>
Signed-off-by: zlayne <zlayne@redhat.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@frontend/packages/multicluster-sdk/generate-doc.mjs`:
- Line 113: Replace the substring check in the documentation export filtering
condition with a path-boundary-aware comparison: exclude only when resolvedPath
equals the resolved search directory or starts with that directory followed by
the platform separator. Update the condition around resolvedPath and the
src/internal/search path to avoid filtering sibling directories such as
searching.
In `@frontend/packages/multicluster-sdk/README.md`:
- Around line 896-898: Replace the raw TSDoc {`@link` convertSearchItemToResource}
markup in the README descriptions, including the corresponding occurrence near
the later referenced section, with valid Markdown link syntax or an inline
code-formatted identifier; ensure no {`@link` ...} markup remains visible in the
generated documentation.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 96783233-3ddd-434a-af2a-7b49aacbbfec
📒 Files selected for processing (2)
frontend/packages/multicluster-sdk/README.mdfrontend/packages/multicluster-sdk/generate-doc.mjs
| const modulePath = node.moduleSpecifier.text | ||
| const resolvedPath = resolveModulePath(modulePath, absolutePath) | ||
| if (resolvedPath) { | ||
| if (resolvedPath && !resolvedPath.includes(`${resolve(baseDir, 'src/internal/search')}`)) { // avoid adding search-sdk exports into readme - not all functions are used. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use a path-boundary check instead of includes.
resolvedPath.includes(...) also matches sibling paths such as src/internal/searching, causing unrelated modules to be omitted from generated documentation. Compare against the directory itself or a separator-delimited descendant path.
🤖 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 `@frontend/packages/multicluster-sdk/generate-doc.mjs` at line 113, Replace the
substring check in the documentation export filtering condition with a
path-boundary-aware comparison: exclude only when resolvedPath equals the
resolved search directory or starts with that directory followed by the platform
separator. Update the condition around resolvedPath and the src/internal/search
path to avoid filtering sibling directories such as searching.
KevinFCormier
left a comment
There was a problem hiding this comment.
@zlayne still looking over this... but I left a couple preliminary questions/comments.
| * const [latestEvent, loading, error] = useFleetSearchSubscription(undefined) | ||
| * ``` | ||
| */ | ||
| export function useFleetSearchSubscription( |
There was a problem hiding this comment.
Is it useful for us to provide this hook as a public API?
There was a problem hiding this comment.
Likely users will opt to use the useFleetSearch hook instead of this hook, as this one only returns the change events.
I was exporting it because I am not sure what contexts users may want to utilize it. Maybe they want to understand when search results become stale, for instance, but don't necessarily need the updated result set?
We can make it private initially and open it if the need arises?
There was a problem hiding this comment.
Yeah, let's keep it private for now.
| const modulePath = node.moduleSpecifier.text | ||
| const resolvedPath = resolveModulePath(modulePath, absolutePath) | ||
| if (resolvedPath) { | ||
| if (resolvedPath && !resolvedPath.includes(`${resolve(baseDir, 'src/internal/search')}`)) { // avoid adding search-sdk exports into readme - not all functions are used. |
There was a problem hiding this comment.
This should not be needed. The SearchInput type needs to be moved to types/search.ts so that it becomes part of the API without pulling in everything else from search-sdk.ts. (Same for Event if we need to keep useFleetSearchSubscription as a public API.)
There was a problem hiding this comment.
Makes sense. I will get this updated.
Signed-off-by: zlayne <zlayne@redhat.com>
There was a problem hiding this comment.
🧹 Nitpick comments (3)
frontend/packages/multicluster-sdk/src/types/search.ts (3)
14-15: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
anyused forDate/Mapscalar mappings.Per coding guidelines, "Avoid
any; useunknownwhen the type is truly unknown." These scalar values aren't codegen output (this file is hand-copied per the comment on line 22/43), sounknownshould be preferable here to avoid silently widening types downstream.🤖 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 `@frontend/packages/multicluster-sdk/src/types/search.ts` around lines 14 - 15, Replace the any types in the Date and Map scalar mappings with unknown in the corresponding type definitions. Keep both input and output fields aligned and leave the remaining scalar mappings unchanged.Source: Coding guidelines
5-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMissing TSDoc on public exports
Maybe/InputMaybe.
SearchFilterandSearchInputhave doc comments butMaybe/InputMaybedon't. As per path instructions, "Use TSDoc comments on all public exports, since the README API section is generated from them," which applies to files undertypes/**/*.tsin this package.🤖 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 `@frontend/packages/multicluster-sdk/src/types/search.ts` around lines 5 - 6, Add TSDoc comments to the public type aliases Maybe and InputMaybe in the search types module, documenting each alias and its nullability/relationship. Keep their existing type definitions and behavior unchanged.Source: Path instructions
22-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoffHand-duplicated types risk drifting from the internal SDK contract.
SearchFilter/SearchInputare copy-pasted frominternal/search/search-sdk.tsrather than derived from it. Any future field change to the internal generated types (e.g. new filter fields) won't be reflected here automatically, silently breaking the public API contract.Also applies to: 42-44
🤖 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 `@frontend/packages/multicluster-sdk/src/types/search.ts` around lines 22 - 23, Replace the hand-duplicated SearchFilter and SearchInput definitions in the types module with types derived from the internal search SDK exports, reusing the existing SearchFilter/SearchInput symbols or their property types as appropriate. Remove the copied field declarations and preserve the public API names while ensuring future internal contract changes propagate automatically.
🤖 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.
Nitpick comments:
In `@frontend/packages/multicluster-sdk/src/types/search.ts`:
- Around line 14-15: Replace the any types in the Date and Map scalar mappings
with unknown in the corresponding type definitions. Keep both input and output
fields aligned and leave the remaining scalar mappings unchanged.
- Around line 5-6: Add TSDoc comments to the public type aliases Maybe and
InputMaybe in the search types module, documenting each alias and its
nullability/relationship. Keep their existing type definitions and behavior
unchanged.
- Around line 22-23: Replace the hand-duplicated SearchFilter and SearchInput
definitions in the types module with types derived from the internal search SDK
exports, reusing the existing SearchFilter/SearchInput symbols or their property
types as appropriate. Remove the copied field declarations and preserve the
public API names while ensuring future internal contract changes propagate
automatically.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: a393de1f-6b8b-445d-a8ee-00fa5a491a3b
📒 Files selected for processing (7)
frontend/packages/multicluster-sdk/README.mdfrontend/packages/multicluster-sdk/generate-doc.mjsfrontend/packages/multicluster-sdk/src/api/index.tsfrontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.tsfrontend/packages/multicluster-sdk/src/index.test.tsfrontend/packages/multicluster-sdk/src/internal/search/search-sdk.tsfrontend/packages/multicluster-sdk/src/types/search.ts
💤 Files with no reviewable changes (1)
- frontend/packages/multicluster-sdk/src/index.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- frontend/packages/multicluster-sdk/src/api/useFleetSearchSubscription.ts
- frontend/packages/multicluster-sdk/generate-doc.mjs
- frontend/packages/multicluster-sdk/src/internal/search/search-sdk.ts
Signed-off-by: zlayne <zlayne@redhat.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
frontend/packages/multicluster-sdk/generate-doc.mjs (1)
149-150: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExpand abbreviated parser names.
Rename
typeStr,propDef, andcolonIdxtotypeString,propertyDefinition, andcolonIndex, including callback parameters.As per coding guidelines, functions and variables “must use descriptive camelCase names and avoid abbreviations.”
Also applies to: 169-175, 186-208, 247-249
🤖 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 `@frontend/packages/multicluster-sdk/generate-doc.mjs` around lines 149 - 150, Rename abbreviated identifiers throughout generate-doc.mjs to descriptive camelCase names: update typeStr to typeString, propDef to propertyDefinition, and colonIdx to colonIndex in simplifyType and all affected code paths, including callback parameters, while preserving existing behavior.Source: Coding guidelines
🤖 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 `@frontend/packages/multicluster-sdk/generate-doc.mjs`:
- Around line 156-161: Update the replacement chain in the documentation
generation logic to preserve InputMaybe wrappers and nested generic boundaries
instead of stripping nullability or flattening nested types. Remove or revise
the InputMaybe/Array regex replacements so expressions such as
InputMaybe<Array<InputMaybe<Record<string, unknown>>>> retain their nullable
array-of-record structure; use balanced parsing only if needed to produce
correct | null unions.
---
Nitpick comments:
In `@frontend/packages/multicluster-sdk/generate-doc.mjs`:
- Around line 149-150: Rename abbreviated identifiers throughout
generate-doc.mjs to descriptive camelCase names: update typeStr to typeString,
propDef to propertyDefinition, and colonIdx to colonIndex in simplifyType and
all affected code paths, including callback parameters, while preserving
existing behavior.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 00a160a0-1ab1-4af1-a310-4a9f9befd32d
📒 Files selected for processing (3)
frontend/packages/multicluster-sdk/README.mdfrontend/packages/multicluster-sdk/generate-doc.mjsfrontend/packages/multicluster-sdk/src/api/useFleetSearch.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- frontend/packages/multicluster-sdk/src/api/useFleetSearch.ts
- frontend/packages/multicluster-sdk/README.md
| .replace(/Scalars\['Date'\]\['(?:input|output)'\]/g, 'Date') | ||
| .replace(/Scalars\['Map'\]\['(?:input|output)'\]/g, 'Record<string, unknown>') | ||
| .replace(/InputMaybe<Array<InputMaybe<([^>]+)>>>/g, '$1[]') | ||
| .replace(/Array<InputMaybe<([^>]+)>>/g, '$1[]') | ||
| .replace(/InputMaybe<Array<([^>]+)>>/g, '$1[]') | ||
| .replace(/InputMaybe<([^>]+)>/g, '$1') |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Preserve nullable wrappers and nested generic boundaries.
These regexes erase InputMaybe<T> nullability. They also misparse nested generics: after the Map replacement, InputMaybe<Array<InputMaybe<Record<string, unknown>>>> becomes Record<string, unknown[]>, changing an array of records into a record of arrays.
Keep wrappers unchanged as a minimal safe fix, or replace this with balanced parsing that emits the correct | null unions.
Minimal safe fix
.replace(/Scalars\['Date'\]\['(?:input|output)'\]/g, 'Date')
.replace(/Scalars\['Map'\]\['(?:input|output)'\]/g, 'Record<string, unknown>')
- .replace(/InputMaybe<Array<InputMaybe<([^>]+)>>>/g, '$1[]')
- .replace(/Array<InputMaybe<([^>]+)>>/g, '$1[]')
- .replace(/InputMaybe<Array<([^>]+)>>/g, '$1[]')
- .replace(/InputMaybe<([^>]+)>/g, '$1')📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .replace(/Scalars\['Date'\]\['(?:input|output)'\]/g, 'Date') | |
| .replace(/Scalars\['Map'\]\['(?:input|output)'\]/g, 'Record<string, unknown>') | |
| .replace(/InputMaybe<Array<InputMaybe<([^>]+)>>>/g, '$1[]') | |
| .replace(/Array<InputMaybe<([^>]+)>>/g, '$1[]') | |
| .replace(/InputMaybe<Array<([^>]+)>>/g, '$1[]') | |
| .replace(/InputMaybe<([^>]+)>/g, '$1') | |
| .replace(/Scalars\['Date'\]\['(?:input|output)'\]/g, 'Date') | |
| .replace(/Scalars\['Map'\]\['(?:input|output)'\]/g, 'Record<string, unknown>') |
🤖 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 `@frontend/packages/multicluster-sdk/generate-doc.mjs` around lines 156 - 161,
Update the replacement chain in the documentation generation logic to preserve
InputMaybe wrappers and nested generic boundaries instead of stripping
nullability or flattening nested types. Remove or revise the InputMaybe/Array
regex replacements so expressions such as
InputMaybe<Array<InputMaybe<Record<string, unknown>>>> retain their nullable
array-of-record structure; use balanced parsing only if needed to produce
correct | null unions.
Signed-off-by: zlayne <zlayne@redhat.com>
Signed-off-by: zlayne <zlayne@redhat.com>
Signed-off-by: zlayne <zlayne@redhat.com>
Signed-off-by: zlayne <zlayne@redhat.com>
|



📝 Summary
Ticket Summary (Title):
Co-Authored with Cursor (Sonnet 5)
Ticket Link:
https://issues.redhat.com/browse/ACM-32322
Type of Change:
✅ Checklist
General
ACM-12340 Fix bug with...)If Feature
If Bugfix
🗒️ Notes for Reviewers
Summary by CodeRabbit
useFleetSearchfor fleet-wide search with pagination and arefetchaction.useFleetSearchSubscriptionfor live INSERT/UPDATE/DELETE result patching via WebSocket.SearchInputnow includesoffsetandorderBy).useFleetSearchanduseFleetSearchSubscription, including export verification.