Skip to content

refactor(dashboard): unify AI chat surfaces on assistant-ui Thread#1427

Merged
mantrakp04 merged 31 commits into
devfrom
refactor/assistant-ui-chat-surfaces
May 15, 2026
Merged

refactor(dashboard): unify AI chat surfaces on assistant-ui Thread#1427
mantrakp04 merged 31 commits into
devfrom
refactor/assistant-ui-chat-surfaces

Conversation

@mantrakp04
Copy link
Copy Markdown
Collaborator

@mantrakp04 mantrakp04 commented May 12, 2026

Summary

  • Replace the bespoke ai-chat-shared chat UI (used by ask-ai, the stack companion widget, vibe coding chat, and the create-dashboard preview) with the shared assistant-ui Thread component.
  • Extract streaming request/format helpers into a new components/assistant-ui/chat-stream.ts module so each surface only owns its ChatModelAdapter.
  • Add a reusable ToolFallback for tool-call rendering and delete the now-unused ai-chat-shared.tsx (-1386 / +747 lines net).

Stacked on top of refactor/data-grid-and-dashboard-surfaces.

Base: refactor/data-grid-and-dashboard-surfaces → Head: refactor/assistant-ui-chat-surfaces · 18 files changed

Red outlines on the after shots mark the unified assistant-ui Thread surface in each location.

Screenshots

Analytics → Tables — AI Query dialog

Before After
Light
Dark

Stack Companion — chat widget

Before After
Light
Dark

Ask-AI command palette (⌘K → Ask AI)

Before After
Light
Dark

Email editor — embedded chat panel

Before After
Light
Dark

Notes for reviewers

The four surfaces above all previously shared components/commands/ai-chat-shared.tsx (516 lines, deleted). After this PR they each own a thin ChatModelAdapter and render through components/assistant-ui/thread.tsx + the new chat-stream.ts helpers. Visual differences between before and after are intentional — the assistant-ui Thread brings its own message bubbles, scroll-to-bottom behaviour, composer, and ToolFallback rendering. The email editor's chat panel is the surface where the behaviour change is most visible (tool-call rendering now consistent with the rest of the app).

Heaviest changes (lines):

  • components/stack-companion/ai-chat-widget.tsx (571)
  • components/commands/ai-chat-shared.tsx (516, deleted)
  • analytics/tables/ai-query-dialog.tsx (429)
  • components/vibe-coding/chat-adapters.ts (400)
  • components/assistant-ui/chat-stream.ts (284, new)
  • components/commands/ask-ai.tsx (274)
  • components/assistant-ui/thread.tsx (115)
  • components/assistant-ui/tool-fallback.tsx (113)

Test plan

  • pnpm lint
  • pnpm typecheck
  • Manually exercise each affected surface: command-center Ask AI, stack-companion widget, vibe-coding chat, analytics tables AI query, create-dashboard preview, email editor chat.
  • Verify tool-call chips render consistently across all four surfaces (uses the new ToolFallback).
  • Verify streaming + cancel works on each adapter (chat-stream.ts is shared).

Summary by CodeRabbit

  • New Features

    • Added pagination and free-text filtering for permission definitions lists
    • Enhanced AI-powered query generation with editable queries and improved tool visualization
    • Added support for composer attachments in email editors
  • Improvements

    • Refactored AI chat interface for better user experience across analytics and drafts
    • Improved error handling and friendly error messages in AI features
    • Streamlined query application workflow with edit-on-blur and keyboard shortcuts

Review Change Stack

mantrakp04 and others added 15 commits May 8, 2026 13:17
…ents surfaces

- Rewrite data-grid with URL-synced state, new sizing logic, tests
- Move analytics/replays → session-replays; add per-user session replays card
- Add team-analytics and team-payments to team detail page
- Add project_user.last_active_at index + permission-definitions pagination
- Various editable-input / inline-save-discard / settings polish
…sion handling

- Introduced pagination for teams in the dashboard, allowing for efficient data retrieval and display.
- Updated permission definitions to include cursor-based pagination, improving user experience when navigating through permissions.
- Refactored various components to utilize the new paginated API, ensuring consistency across the application.
- Added error handling for pagination and improved loading states in user session replays and team member tables.
- Enhanced the data grid to support URL-synced state for column widths and visibility, improving user customization options.

This update significantly enhances the dashboard's performance and usability, particularly for users managing large teams and permissions.
- Updated the ProjectUser model to simplify indexing on lastActiveAt.
- Refactored permission definitions pagination to utilize a unified schema, improving consistency across project and team permissions.
- Enhanced error handling in pagination logic for better user feedback.
- Improved loading states and data retrieval efficiency in various components, including session replays and team permissions.

These changes streamline the permission management experience and optimize data handling in the dashboard.
…election logic

- Renamed cursor comparator variable for clarity in session replay queries.
- Enhanced search query handling to include escape character for better SQL compatibility.
- Introduced error handling for asynchronous queries in the Team Analytics section, providing default values for failed queries.
- Refactored data grid selection logic to support flexible row selection modes and improved column width distribution.

These changes enhance the robustness and usability of the dashboard components, particularly in data retrieval and user interaction.
- Deleted the 'dev:tui' script from various package.json files across apps and examples, as it was redundant and not utilized in the current development workflow.
- This cleanup helps streamline the project configuration and reduces potential confusion for developers.
- Updated user and team listing functions to utilize paginated APIs, enhancing data retrieval efficiency.
- Refactored related components to support the new pagination structure, ensuring consistency across the application.
- Improved error handling and response structures for better user feedback during data operations.

These changes optimize the performance of user and team management features in the dashboard.
- Enhanced the `paginatePermissionDefinitions` function to include sorting by ID using a string comparison utility.
- Improved error handling for cursor validation, throwing a `StatusError` when the cursor is not found, ensuring better user feedback.
- Updated related components to maintain consistency in pagination behavior across the application.

These changes optimize the user experience when navigating permission definitions and enhance data retrieval reliability.
- Improved cursor-based pagination logic to ensure that the cursor matches the current filter set, preventing issues when filters are swapped between requests.
- Updated error handling to throw a `KnownErrors.ItemNotFound` when the cursor is invalid or does not meet duration constraints.
- Refactored related components to maintain consistency in pagination behavior across the application.

These changes enhance the reliability of data retrieval and improve user experience when navigating session replays and team permissions.
- Updated the user permissions type to allow for null values, indicating permission fetch failures distinctly from empty arrays.
- Improved loading state management in the TeamMemberTable and EditPermissionDialog components to provide better user feedback during permission retrieval.
- Refactored permission-related logic to ensure consistent handling of permissions across the dashboard.

These changes enhance the user experience by clearly indicating permission loading issues and improving the overall reliability of permission management.
- Replaced the use of `createDefaultDataGridState` with `useDataGridUrlState` across multiple components to improve state persistence and URL synchronization.
- Updated pagination logic in various tables to ensure consistent handling of grid states and improve user experience during data retrieval.
- Refactored components to utilize the new user picker table for better user selection functionality.

These changes enhance the overall reliability and usability of the dashboard's data grid features.
Replaces the bespoke ai-chat-shared chat UI used by ask-ai, the stack
companion widget, vibe coding chat, and the create-dashboard preview
with the shared assistant-ui Thread component. Extracts the streaming
request/format helpers into a new chat-stream module and the tool call
UI into a reusable ToolFallback.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stack-auth-hosted-components Ready Ready Preview, Comment May 15, 2026 9:27pm
stack-auth-mcp Ready Ready Preview, Comment May 15, 2026 9:27pm
stack-backend Ready Ready Preview, Comment May 15, 2026 9:27pm
stack-dashboard Ready Ready Preview, Comment May 15, 2026 9:27pm
stack-demo Ready Ready Preview, Comment May 15, 2026 9:27pm
stack-docs Ready Ready Preview, Comment May 15, 2026 9:27pm
stack-preview-backend Ready Ready Preview, Comment May 15, 2026 9:27pm
stack-preview-dashboard Ready Ready Preview, Comment May 15, 2026 9:27pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c3993e3b-0060-44a5-bbfe-f3368d26c1eb

📥 Commits

Reviewing files that changed from the base of the PR and between c808e23 and f43590c.

📒 Files selected for processing (28)
  • apps/backend/src/app/api/latest/permission-definitions-pagination.ts
  • apps/backend/src/app/api/latest/team-permission-definitions/crud.tsx
  • apps/backend/src/app/api/latest/users/crud.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/ai-query-dialog.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/use-ai-query-chat.test.ts
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/use-ai-query-chat.ts
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-drafts/[draftId]/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-templates/[templateId]/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-themes/[themeId]/page-client.tsx
  • apps/dashboard/src/components/assistant-ui/chat-stream.ts
  • apps/dashboard/src/components/assistant-ui/thread.tsx
  • apps/dashboard/src/components/assistant-ui/tool-fallback.tsx
  • apps/dashboard/src/components/assistant-ui/tooltip-icon-button.tsx
  • apps/dashboard/src/components/commands/ai-chat-shared.tsx
  • apps/dashboard/src/components/commands/ask-ai.tsx
  • apps/dashboard/src/components/commands/create-dashboard/create-dashboard-preview.tsx
  • apps/dashboard/src/components/commands/run-query.tsx
  • apps/dashboard/src/components/data-table/permission-table.tsx
  • apps/dashboard/src/components/stack-companion/ai-chat-widget.tsx
  • apps/dashboard/src/components/vibe-coding/chat-adapters.ts
  • apps/dashboard/src/components/vibe-coding/index.ts
  • apps/e2e/tests/backend/endpoints/api/v1/team-permission-definitions.test.ts
  • apps/e2e/tests/helpers.ts
  • docs-mintlify/openapi/admin.json
  • packages/stack-shared/src/interface/admin-interface.ts
  • packages/template/src/lib/stack-app/apps/implementations/admin-app-impl.ts
  • packages/template/src/lib/stack-app/apps/interfaces/admin-app.ts

📝 Walkthrough

Walkthrough

This PR implements a major migration of frontend AI chat interactions from @ai-sdk/react to @assistant-ui/react while adding cursor/limit pagination support for permission definitions across the backend and frontend. The changes span unified streaming adapters, thread UI enhancements, analytics query chat refactoring, command-center and dashboard chat rewrites, widget migration, and associated permissions pagination infrastructure.

Changes

AI Chat Migration & Permission Pagination

Layer / File(s) Summary
Backend permission definitions pagination
apps/backend/src/app/api/latest/permission-definitions-pagination.ts
Implements cursor/limit pagination with binary-search cursor fallback, validates that cursor requires limit, supports case-insensitive free-text filtering by id/description, and returns paginated results with next_cursor.
CRUD handlers and pagination integration
apps/backend/src/app/api/latest/team-permission-definitions/crud.tsx, apps/backend/src/app/api/latest/users/crud.tsx
Wires pagination schema into team permission list endpoint; updates users list to fetch limit + 1 rows, apply skip: 1 when cursor provided, and compute next_cursor based on extra-row detection.
Admin interface and SDK pagination methods
packages/stack-shared/src/interface/admin-interface.ts, packages/template/src/lib/stack-app/apps/implementations/admin-app-impl.ts, packages/template/src/lib/stack-app/apps/interfaces/admin-app.ts
Adds listTeamPermissionDefinitionsPaginated methods to admin interface and SDK to expose paginated permission fetching with limit, cursor, and query parameters.
Core unified AI chat streaming adapter
apps/dashboard/src/components/assistant-ui/chat-stream.ts
New infrastructure module providing end-to-end unified streaming: formats thread messages, authenticates requests, parses JSON event streams, converts UI chunks to chat content, configures DefaultChatTransport, implements ChatModelAdapter with lifecycle hooks, and classifies AI errors.
Thread component enhancements and tool UI
apps/dashboard/src/components/assistant-ui/thread.tsx, apps/dashboard/src/components/assistant-ui/tool-fallback.tsx, apps/dashboard/src/components/assistant-ui/tooltip-icon-button.tsx
Expands Thread with welcome state, custom assistant content components, and autoFocus composer support; introduces ToolFallback component for streamed tool rendering with collapsible result/error/progress display; adds tooltip portal wrapper.
Analytics query chat hook and dialog refactoring
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/use-ai-query-chat.ts, apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/use-ai-query-chat.test.ts, apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/ai-query-dialog.tsx, apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/page-client.tsx
Rewrites useAiQueryChat to use @assistant-ui/react local runtime; updates extractLatestQuery to parse ThreadMessage tool-call content; refactors dialog to use editable query draft with AssistantRuntimeProvider and Thread, including AnalyticsQueryToolCall renderer and AiQueryWelcome state.
Command-center ask-ai refactoring
apps/dashboard/src/components/commands/ask-ai.tsx, apps/dashboard/src/components/commands/ai-chat-shared.tsx
Refactors AIChatPreview to unified adapter + AssistantRuntimeProvider + Thread, removes entire ai-chat-shared.tsx file (custom transport, message/tool components, word streaming), and adds AskAiAutoSend debounced query appender.
Dashboard and vibe-coding chat adapters
apps/dashboard/src/components/commands/create-dashboard/create-dashboard-preview.tsx, apps/dashboard/src/components/vibe-coding/chat-adapters.ts, apps/dashboard/src/components/vibe-coding/index.ts
Migrates create-dashboard-preview to createUnifiedAiTransport with buildDashboardMessages transform; rewrites vibe-coding adapters to createUnifiedAiChatAdapter with sanitized content and tool-call extraction; removes prior streaming generator functions.
Stack companion AI chat widget refactoring
apps/dashboard/src/components/stack-companion/ai-chat-widget.tsx
Migrates widget from @ai-sdk/react useChat to @assistant-ui/react runtime; adds stored-message conversion helpers (convertStoredPartsToThreadContent, storedMessagesToThreadMessages) for legacy hydration; implements persistence and replaces custom streaming/scroll/input with Thread.
Data table pagination and composer attachments
apps/dashboard/src/components/data-table/permission-table.tsx, apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-drafts/[draftId]/page-client.tsx, apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-templates/[templateId]/page-client.tsx, apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-themes/[themeId]/page-client.tsx, apps/dashboard/src/components/commands/run-query.tsx
Adds PAGE_SIZE constant and server-side infinite pagination for team permissions using listTeamPermissionDefinitionsPaginated; adds composerAttachments prop to AssistantChat in email editors; increases debounce delays to 1000ms for dashboard and query generation.
E2E tests, documentation, and helper updates
apps/e2e/tests/backend/endpoints/api/v1/team-permission-definitions.test.ts, docs-mintlify/openapi/admin.json, apps/e2e/tests/helpers.ts
Adds comprehensive pagination/filtering/cursor tests; updates OpenAPI spec with limit/cursor/query parameters; converts mailbox wait helper to deadline-based polling; updates vibe-coding barrel export.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • hexclave/stack-auth#1424: Adds shared permission-definitions-pagination.ts pagination infrastructure also used in this PR's backend and team permission CRUD integration.

Suggested reviewers

  • N2D4

Poem

🐰 A migration leap, from SDK to runtime bright,
Thread adapters now weave the chat's unified flight,
Permissions paginate with cursors that glide,
Through buffers and streams where the queries reside,
One query, one chat, one assistant in sight!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/assistant-ui-chat-surfaces

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/backend/src/app/api/latest/users/crud.tsx

Parsing error: error TS5012: Cannot read file '/tsconfig.json': ENOENT: no such file or directory, open '/tsconfig.json'.

apps/dashboard/src/components/assistant-ui/thread.tsx

Parsing error: error TS5012: Cannot read file '/tsconfig.json': ENOENT: no such file or directory, open '/tsconfig.json'.

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/use-ai-query-chat.ts

Parsing error: error TS5012: Cannot read file '/tsconfig.json': ENOENT: no such file or directory, open '/tsconfig.json'.

  • 23 others

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR replaces four separate bespoke chat UIs (ask-ai, stack-companion widget, vibe-coding chat, analytics query dialog) with the shared assistant-ui Thread component, and extracts streaming/formatting helpers into a new components/assistant-ui/chat-stream.ts module. The net result is −1386/+747 lines with consistent rendering, scroll management, and error handling across all surfaces.

  • chat-stream.ts centralises sendAiStreamRequest, formatThreadMessagesForBackend, uiPartsToChatContent, createUnifiedAiTransport, and createUnifiedAiChatAdapter; parse failures now call captureError instead of being silently dropped.
  • thread.tsx gains welcome, assistantContentComponents, and autoFocusComposer props; per-surface background and gradient logic is removed in favour of a transparent root.
  • use-ai-query-chat.ts migrates from useChat+DefaultChatTransport to useLocalThreadRuntime+createAnalyticsQueryChatAdapter, with manual runtime.thread.subscribe bridging thread state to React.

Confidence Score: 5/5

Safe to merge; the refactoring is largely mechanical and well-tested with no data-integrity or auth regressions.

The streaming and formatting helpers are cleanly extracted and the previous silent-parse-drop bug is now fixed with captureError. The migration from useChat to useLocalRuntime/useLocalThreadRuntime is consistent across surfaces, tests cover the updated extractLatestQuery logic, and backward-compatible deserialization of legacy stored messages is handled. New findings are limited to the dropped onBlur keyboard shortcut in the command-palette ask-ai panel and the semantically mismatched DatabaseIcon used as the generic tool fallback icon.

The three email page clients (email-drafts, email-templates, email-themes) each set composerAttachments without providing an attachmentAdapter, which was flagged in the previous review and remains unresolved.

Important Files Changed

Filename Overview
apps/dashboard/src/components/assistant-ui/chat-stream.ts New module centralizing AI streaming helpers. Parse failures now call captureError. Callers passing a plain currentUser value (not a getter) freeze the user at adapter creation time.
apps/dashboard/src/components/assistant-ui/thread.tsx Adds welcome, assistantContentComponents, and autoFocusComposer props. Removes per-surface background and gradient logic in favour of a transparent root.
apps/dashboard/src/components/assistant-ui/tool-fallback.tsx New reusable collapsible tool-call card. Hardcodes DatabaseIcon for all tool names, which is semantically wrong for non-database tools like docs.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/use-ai-query-chat.ts Migrated from useChat to useLocalThreadRuntime. currentUser is a plain value in useMemo deps, so every token refresh rebuilds the adapter and potentially resets the conversation.
apps/dashboard/src/components/commands/ask-ai.tsx Replaces bespoke chat UI with Thread + useLocalRuntime. The onBlur prop from CmdKPreviewProps is no longer wired, removing the ArrowLeft keyboard shortcut to return focus to the command palette.
apps/dashboard/src/components/stack-companion/ai-chat-widget.tsx Large simplification removing bespoke scroll/input management. storedMessagesToThreadMessages handles backward-compatible deserialization of legacy message formats. pendingMessagesRef save-queue logic is preserved correctly.
apps/dashboard/src/components/vibe-coding/chat-adapters.ts Removes ~200 lines of duplicated streaming/formatting helpers now in chat-stream.ts. Adds createAnalyticsQueryChatAdapter.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/analytics/tables/ai-query-dialog.tsx Replaces manual message rendering with AssistantRuntimeProvider + Thread. Adds editable Textarea for the current query draft with Cmd+Enter and on-blur apply.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-drafts/[draftId]/page-client.tsx Adds composerAttachments without a corresponding attachmentAdapter. Same pattern in email-templates and email-themes.
apps/dashboard/src/components/commands/ai-chat-shared.tsx Deleted (-558 lines). All helpers replaced by chat-stream.ts, thread.tsx, tool-fallback.tsx, and markdown-text.tsx.

Fix All in Claude Code Fix All in Cursor Fix All in Codex

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
apps/dashboard/src/components/commands/ask-ai.tsx:96-103
**`onBlur` keyboard-navigation prop is silently dropped**

`CmdKPreviewProps` includes an `onBlur` callback that the old implementation invoked when the user pressed `ArrowLeft` at position 0 in the follow-up input, returning keyboard focus to the command-palette search bar. `AIChatPreviewInner` now ignores this prop entirely — it's spread into the component via `...rest` but never destructured or forwarded to the `Thread` composer. Users relying on the ArrowLeft shortcut to navigate back to the command palette will find it no longer works.

### Issue 2 of 2
apps/dashboard/src/components/assistant-ui/tool-fallback.tsx:52-53
**`DatabaseIcon` used for all tool types regardless of semantics**

The fallback icon is `DatabaseIcon` for every tool call, including the `docs` tool used by the ask-ai and stack-companion surfaces. When the backend calls `docs` to retrieve documentation, users see a database icon and the label "docs" — which is confusing. Consider mapping `docs` to a document/book icon, or using a more neutral icon (e.g. `CpuIcon` / `SparkleIcon`) as the default.

Reviews (4): Last reviewed commit: "Refactor AIChatPreview component to util..." | Re-trigger Greptile

Comment thread apps/dashboard/src/components/assistant-ui/chat-stream.ts
Comment thread apps/dashboard/src/components/stack-companion/ai-chat-widget.tsx
Comment thread apps/dashboard/src/components/stack-companion/ai-chat-widget.tsx
Comment thread apps/dashboard/src/components/stack-companion/ai-chat-widget.tsx
Comment thread apps/dashboard/src/components/stack-companion/ai-chat-widget.tsx
mantrakp04 and others added 5 commits May 12, 2026 11:46
- Removed unused parameters from session replay queries, specifically `sort_direction` and `q`, to simplify the API.
- Updated user and team listing functions to utilize non-paginated APIs, enhancing data retrieval efficiency.
- Refactored related components to support the new API structure, ensuring consistency across the application.
- Improved error handling and response structures for better user feedback during data operations.

These changes optimize the performance of session replay and user management features in the dashboard.
- Modified the `limit` parameter in the user query schema to remove the maximum cap description, simplifying the API documentation.
- Updated corresponding OpenAPI specifications in both admin and server JSON files to reflect the change in the `limit` parameter description.

These changes enhance the clarity of the API documentation and improve user understanding of the query parameters.
- Added a newline at the end of the `admin.json` and `server.json` files to comply with JSON formatting standards. This change ensures better compatibility with various parsers and tools that expect a newline at the end of files.
- Replaced fixed retry count with a timeout-based approach in the `waitForMessagesWithSubjectCount` method to improve flexibility and reliability.
- Introduced configurable timeout and interval values, allowing for better control over message fetching behavior.

These changes optimize the waiting mechanism for message retrieval in end-to-end tests.
mantrakp04 and others added 5 commits May 13, 2026 15:17
- Updated the conversation dialog component to utilize UserPickerTable instead of UserSearchPicker for improved user experience and functionality.
…on type selection

- Simplified the loading state handling in the RuleTriggerHistoryDialog component to ensure proper state updates based on the latest request ID.
- Enhanced the action type selection logic in the RuleEditor component to restrict values to valid options, improving user input validation.
- Added error capturing for parsing failures in the AI chat stream to improve debugging and error tracking.
- Updated the AI chat widget to generate a unique tool call ID using `crypto.randomUUID()` when none is provided, ensuring each tool call is uniquely identifiable.

These changes improve the robustness of the chat functionality and enhance error visibility.
Comment thread apps/dashboard/src/components/commands/ask-ai.tsx Outdated
- Updated the AIChatPreview component to accept the query prop directly, enhancing its functionality by using it as a key for the inner component.
- This change improves the component's performance and ensures that the correct query is passed down to the AIChatPreviewInner.
Base automatically changed from refactor/data-grid-and-dashboard-surfaces to dev May 15, 2026 21:16
@mantrakp04 mantrakp04 merged commit 5cb9240 into dev May 15, 2026
15 of 24 checks passed
@mantrakp04 mantrakp04 deleted the refactor/assistant-ui-chat-surfaces branch May 15, 2026 21:21
@coderabbitai coderabbitai Bot mentioned this pull request May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants