Skip to content

feat(frontend): copilot composer + menu with Skills/Scheduled/Integrations modals and guided creation flows - #13489

Merged
0ubbe merged 21 commits into
devfrom
feat/copilot-plus-menu
Jul 13, 2026
Merged

feat(frontend): copilot composer + menu with Skills/Scheduled/Integrations modals and guided creation flows#13489
0ubbe merged 21 commits into
devfrom
feat/copilot-plus-menu

Conversation

@0ubbe

@0ubbe 0ubbe commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Why / What / How

Why: Attaching context and reaching the surfaces that configure AutoPilot (connected services, learned skills, recurring tasks) are scattered across the app. The composer needs one obvious entry point for adding context, and creating a skill or a scheduled task needs one consistent pattern: "describe it to AutoPilot and it sets it up."

What: Adds a single + menu to the AutoPilot composer with four fixed actions — Attach file, Integrations, Skills, Scheduled. The last three open modals over /copilot so the user never loses their chat context (a deliberate deviation from the PRD's V1 routing — this pulls the PRD's V2 "keep users on AutoPilot, like Claude" forward; agreed in product discussion). New skill and New scheduled task are guided flows that pre-fill the composer with a purpose-written prompt (verbatim from the PRD), focused and ready to send.

How:

  • The bodies of /library/skills, /library/followups, and /settings/integrations are extracted into shared panels under src/components/contextual/ (SkillsPanel, SchedulesPanel, IntegrationsPanel). The pages stay at their routes as thin wrappers; the copilot modals render the same panels — one implementation, two surfaces.
  • Modal state is a ?modal=skills|scheduled|integrations query param on /copilot (nuqs), so modals are deep-linkable and browser-back closes them.
  • Guided prompts reuse the existing initialPrompt prefill channel: from a modal we set the store directly; from a page we navigate with the existing /copilot#prompt=<encoded> hash pattern. consumeInitialPrompt now also focuses the textarea so the draft is immediately editable (send enables via existing logic).
  • AttachmentMenu became ComposerPlusMenu; the popover is a flat list and is not structurally gated by flags — with CHAT_WORKSPACE_FILES on, a "Use File from Workspace" option simply appears after "Attach file".

Changes 🏗️

  • ComposerPlusMenu (replaces AttachmentMenu): fixed four-item menu; Integrations/Skills/Scheduled open copilot modals
  • CopilotModals + useCopilotModal: three dialogs over /copilot driven by ?modal=
  • SkillsPanel (extracted): adds New skill primary button (tooltip: "Teach AutoPilot a new skill in chat"), Upload skill becomes secondary (tooltip: "Import a skill file you've exported"), spec empty-state copy, "New" badge on a just-uploaded skill
  • SchedulesPanel (extracted): adds New scheduled task primary button, spec empty-state copy (calendar icon, "Nothing scheduled yet"), "New chat"/"Same chat" badge on copilot follow-up rows (graph rows already had the green "Agent run" badge)
  • IntegrationsPanel (moved from settings/integrations/components): unchanged behavior; header title can be hidden inside the modal
  • Guided prompt constants in components/contextual/guidedPrompts.ts (verbatim PRD copy)
  • Integration tests for the menu, modals, guided flows, badges, and empty states

Notes:

  • Frontend-only. Backend already has everything the guided prompts reference (store_skill, schedule_followup with new-vs-same-session support, skills/schedules REST routes).
  • The schedule_followup copilot tool is gated by the copilot-scheduled-followups LaunchDarkly flag — users without it can send the guided prompt but AutoPilot won't have the tool available.

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • + menu lists the four base actions in fixed order (plus "Use File from Workspace" when its flag is on); selecting one closes the menu
    • Attach file keeps the typed draft in the composer
    • Skills/Scheduled/Integrations modals open via menu and ?modal= deep link, close on dismiss
    • New skill / New scheduled task close the modal and pre-fill the composer with the verbatim prompt (store-level assertion); page-surface buttons navigate with /copilot#prompt=
    • Upload skill shows the "New" badge on the uploaded skill
    • Empty states show the spec copy; follow-up rows show New chat badge
    • Existing skills/followups/integrations page test suites still pass (431 tests across touched areas)

0ubbe and others added 8 commits July 6, 2026 23:32
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…skills surface

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… flow and type badges

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ia ?modal= param

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

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR adds Copilot modal state and dialog rendering, replaces the chat attachment menu with a plus menu that opens modals, extracts skills/schedules/integrations panels, and routes library pages to Copilot guided prompts. It also updates related tests, empty-state copy, and badge labels.

Changes

Copilot modals and contextual panels

Layer / File(s) Summary
Modal state and shell wiring
.../copilot/useCopilotModal.ts, .../copilot/components/CopilotModals/*, .../copilot/CopilotPage.tsx, .../copilot/__tests__/*
Adds modal query-state helpers, modal dialogs for skills/scheduled/integrations, mounts them in CopilotPage, and updates nuqs test mocks.
Composer menu and chat input
.../ChatInput/components/ComposerPlusMenu.tsx, .../ChatInput/ChatInput.tsx, .../ChatInput/useChatInput.ts, .../ChatInput/components/__tests__/*
Replaces the attachment menu with a plus menu that opens Copilot modals, keeps file upload/workspace selection, and focuses the textarea after applying an initial prompt.
Guided prompts and skills panel
.../guidedPrompts.ts, .../SkillsPanel/*, .../library/skills/page.tsx, .../library/skills/__tests__/*
Adds prompt constants, the skills panel, upload callback flow, skill list badges, and guided prompt navigation from the skills page.
Schedules panel and followups flow
.../SchedulesPanel/*, .../library/followups/page.tsx, .../library/followups/__tests__/*
Renames the schedules hook, adds the schedules panel, updates followup badges and empty/error states, and routes the followups page/tests to guided prompts.
Integrations panel extraction
.../IntegrationsPanel/*, .../settings/integrations/page.tsx
Adds the integrations panel, optional header title control, and page-level replacement of inline connect-dialog wiring.

Estimated code review effort: 4 (Complex) | ~75 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ComposerPlusMenu
  participant useCopilotModal
  participant CopilotModals
  participant SkillsPanel
  participant useCopilotUIStore

  User->>ComposerPlusMenu: choose Skills / Scheduled / Integrations
  ComposerPlusMenu->>useCopilotModal: openModal(...)
  useCopilotModal-->>CopilotModals: modal query state changes
  CopilotModals->>SkillsPanel: render dialog content
  User->>SkillsPanel: click guided prompt action
  SkillsPanel->>CopilotModals: onGuidedPrompt(prompt)
  CopilotModals->>useCopilotModal: closeModal()
  CopilotModals->>useCopilotUIStore: setInitialPrompt(prompt)
Loading

Possibly related PRs

Suggested labels: size/xl, platform/frontend

Suggested reviewers: kcze, ntindle

Poem

A rabbit hopped through modal doors,
New prompts bloomed in chat and stores.
Skills and schedules sprang to view,
Plus menus with a fresher hue.
🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main frontend change: a copilot composer plus menu with modals and guided creation flows.
Description check ✅ Passed The description is directly aligned with the changeset and explains the menu, modals, shared panels, and guided prompt flows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/copilot-plus-menu

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.

@github-actions github-actions Bot added platform/frontend AutoGPT Platform - Front end size/xl labels Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Overlap Detection

This check compares your PR against all other open PRs targeting the same branch to detect potential merge conflicts early.

🔴 Merge Conflicts Detected

The following PRs have been tested and will have merge conflicts if merged after this PR. Consider coordinating with the authors.

🟢 Low Risk — File Overlap Only

These PRs touch the same files but different sections (click to expand)

Summary: 4 conflict(s), 0 medium risk, 1 low risk (out of 5 PRs with file overlap)


Auto-generated on push. Ignores: openapi.json, lock files.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.30435% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.05%. Comparing base (89d0e62) to head (9ab2e7f).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #13489      +/-   ##
==========================================
- Coverage   75.72%   75.05%   -0.68%     
==========================================
  Files        2644     2623      -21     
  Lines      201326   194905    -6421     
  Branches    19459    19196     -263     
==========================================
- Hits       152458   146279    -6179     
+ Misses      44566    44465     -101     
+ Partials     4302     4161     -141     
Flag Coverage Δ
platform-frontend 45.44% <92.22%> (+0.09%) ⬆️
platform-frontend-e2e 31.08% <23.43%> (-1.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Platform Backend 82.12% <ø> (-0.57%) ⬇️
Platform Frontend 49.43% <91.30%> (+0.07%) ⬆️
AutoGPT Libs ∅ <ø> (∅)
Classic AutoGPT 28.43% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@0ubbe
0ubbe marked this pull request as ready for review July 7, 2026 06:46
@0ubbe
0ubbe requested a review from a team as a code owner July 7, 2026 06:46
@0ubbe
0ubbe requested review from Bentlybro and kcze and removed request for a team July 7, 2026 06:46
@0ubbe

0ubbe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

!deploy

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploying PR #13489 to development environment...

@0ubbe

0ubbe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Preview environment is live (all services healthy)

  • Deployed: 9ab2e7f69fc978c52f5da6cd0641215d08a90f7e at 2026-07-10 11:50 UTC
  • Database: isolated Supabase branch pr-13489 (state persists across redeploys unless migration drift forces a reset)
  • URLs: posted in the team Discord

Push more commits, then comment !deploy to update · !undeploy or close the PR to tear down.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
autogpt_platform/frontend/src/components/contextual/SchedulesPanel/useSchedulesPanel.ts (1)

49-57: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Partial fetch failure hides all successfully-loaded schedules.

error is set to copilotQuery.error ?? graphQuery.error, so if only one of the two independent queries fails, SchedulesPanel renders a full-page ErrorCard and discards the other query's successfully-fetched schedules entirely (see SchedulesPanel.tsx Line 47: {error ? <ErrorCard .../> : ...}). A transient failure in the graph-schedules endpoint, for example, would hide all copilot follow-ups that loaded fine.

Consider surfacing a partial-error indicator (e.g., inline banner) while still rendering whichever list succeeded, rather than an all-or-nothing error state.

Proposed fix: don't let one failed query hide the other's data
   return {
     followups: copilotQuery.data ?? [],
     schedules,
     isLoading: copilotQuery.isLoading || graphQuery.isLoading,
-    error: copilotQuery.error ?? graphQuery.error,
+    // Only treat as a hard error when neither source has data to show.
+    error: schedules.length === 0
+      ? copilotQuery.error ?? graphQuery.error
+      : null,
+    partialError: copilotQuery.error ?? graphQuery.error,
   };
🤖 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
`@autogpt_platform/frontend/src/components/contextual/SchedulesPanel/useSchedulesPanel.ts`
around lines 49 - 57, The combined error state in useSchedulesPanel is too
coarse: error currently returns copilotQuery.error ?? graphQuery.error, which
makes SchedulesPanel switch to the full ErrorCard even when the other query
succeeded. Update useSchedulesPanel (and the SchedulesPanel error handling it
feeds) so a single query failure does not suppress successfully loaded data;
keep rendering schedules/followups from the successful query and expose
partial-failure state separately, such as a non-blocking inline warning. Use the
existing symbols copilotQuery, graphQuery, schedules, followups, and error to
route partial results without turning the whole panel into an all-or-nothing
error state.
🧹 Nitpick comments (1)
autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/useChatInput.ts (1)

30-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider a regression test for the new focus-on-consume behavior.

This focus-after-prefill logic is core to the guided-prompt UX this PR adds (modal → prefilled composer → user can type immediately). A test asserting the textarea receives focus after initialPrompt is consumed would guard this critical path against regressions.

🤖 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
`@autogpt_platform/frontend/src/app/`(platform)/copilot/components/ChatInput/useChatInput.ts
around lines 30 - 38, Add a regression test for the focus-on-consume behavior in
useChatInput. Verify that when initialPrompt is consumed, the textarea
identified by inputId is focused so the guided-flow prefilled composer becomes
immediately editable. Cover the logic around the effect/callback that calls
document.getElementById and textarea.focus() to protect this modal-to-composer
UX path from regressions.
🤖 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
`@autogpt_platform/frontend/src/app/`(platform)/copilot/__tests__/CopilotPage.test.tsx:
- Around line 92-96: The shared nuqs mock in CopilotPage.test.tsx is not
key-aware, so useQueryState("sessionId", ...) and useQueryState("modal", ...)
both receive the same value and can interfere with each other. Update the
vi.mock("nuqs") implementation so useQueryState inspects the requested query key
and returns separate mocked state for sessionId versus modal, keeping
CopilotPage and CopilotModals tests isolated. Use the existing
mockSessionIdForQueryState setup as the sessionId-backed state and add a
dedicated modal mock value for the modal path.

In `@autogpt_platform/frontend/src/components/contextual/guidedPrompts.ts`:
- Around line 1-3: The user-facing NEW_SKILL_PROMPT text contains a grammar typo
by using “it’s” instead of the possessive “its” in the guided prompt copy.
Update the string in guidedPrompts.ts for NEW_SKILL_PROMPT so the phrase reads
naturally and correctly, keeping the rest of the prompt unchanged.

---

Outside diff comments:
In
`@autogpt_platform/frontend/src/components/contextual/SchedulesPanel/useSchedulesPanel.ts`:
- Around line 49-57: The combined error state in useSchedulesPanel is too
coarse: error currently returns copilotQuery.error ?? graphQuery.error, which
makes SchedulesPanel switch to the full ErrorCard even when the other query
succeeded. Update useSchedulesPanel (and the SchedulesPanel error handling it
feeds) so a single query failure does not suppress successfully loaded data;
keep rendering schedules/followups from the successful query and expose
partial-failure state separately, such as a non-blocking inline warning. Use the
existing symbols copilotQuery, graphQuery, schedules, followups, and error to
route partial results without turning the whole panel into an all-or-nothing
error state.

---

Nitpick comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/components/ChatInput/useChatInput.ts:
- Around line 30-38: Add a regression test for the focus-on-consume behavior in
useChatInput. Verify that when initialPrompt is consumed, the textarea
identified by inputId is focused so the guided-flow prefilled composer becomes
immediately editable. Cover the logic around the effect/callback that calls
document.getElementById and textarea.focus() to protect this modal-to-composer
UX path from regressions.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 612b0667-e2f1-4e05-852d-07b891f33a5a

📥 Commits

Reviewing files that changed from the base of the PR and between 59f6ede and bf372ca.

📒 Files selected for processing (79)
  • autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/CopilotPage.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/__tests__/ChatInput.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/AttachmentMenu.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/AttachmentMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/useChatInput.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotModals/CopilotModals.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotModals/__tests__/CopilotModals.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotModal.ts
  • autogpt_platform/frontend/src/app/(platform)/library/followups/__tests__/main.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/followups/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/skills/__tests__/main.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/skills/components/UploadSkillButton/UploadSkillButton.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/skills/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/settings/integrations/page.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/IntegrationsPanel.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/__tests__/helpers.test.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/ConnectServiceDialog.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/__tests__/helpers.test.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/ApiKeyConnectForm.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/DetailView.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/McpConnectPanel.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/MethodPanel.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/OAuthConnectButton.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/ProviderAvatar.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/UnsupportedNotice.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/__tests__/McpConnectPanel.test.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/__tests__/helpers.test.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/__tests__/useOAuthConnect.test.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/helpers.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/schema.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/useApiKeyConnectForm.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/DetailView/useOAuthConnect.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/ListView.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/components/ProviderRow.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/helpers.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/useConnectServiceDialog.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ConnectServiceDialog/useMeasuredHeight.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/CredentialRow/CredentialRow.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/DeleteConfirmDialog/DeleteConfirmDialog.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/DeleteConfirmDialog/__tests__/DeleteConfirmDialog.test.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsHeader/IntegrationsHeader.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsHeader/__tests__/IntegrationsHeader.test.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsList/IntegrationsList.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsList/IntegrationsListSkeleton.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsList/__tests__/IntegrationsListSkeleton.test.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsList/__tests__/useIntegrationsSelection.test.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsList/useIntegrationsList.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsList/useIntegrationsSelection.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsListEmpty/IntegrationsListEmpty.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsListEmpty/__tests__/IntegrationsListEmpty.test.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsSearch/IntegrationsSearch.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/IntegrationsSelectionBar/IntegrationsSelectionBar.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/ProviderGroup/ProviderGroup.tsx
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/components/hooks/useDeleteIntegration.ts
  • autogpt_platform/frontend/src/components/contextual/IntegrationsPanel/helpers.ts
  • autogpt_platform/frontend/src/components/contextual/SchedulesPanel/SchedulesPanel.tsx
  • autogpt_platform/frontend/src/components/contextual/SchedulesPanel/components/EmptyFollowups/EmptyFollowups.tsx
  • autogpt_platform/frontend/src/components/contextual/SchedulesPanel/components/FollowupListItem/FollowupListItem.tsx
  • autogpt_platform/frontend/src/components/contextual/SchedulesPanel/components/FollowupListItem/helpers.test.ts
  • autogpt_platform/frontend/src/components/contextual/SchedulesPanel/components/FollowupListItem/helpers.ts
  • autogpt_platform/frontend/src/components/contextual/SchedulesPanel/components/FollowupListItem/useFollowupListItem.ts
  • autogpt_platform/frontend/src/components/contextual/SchedulesPanel/components/GraphScheduleListItem/GraphScheduleListItem.tsx
  • autogpt_platform/frontend/src/components/contextual/SchedulesPanel/components/GraphScheduleListItem/useGraphScheduleListItem.ts
  • autogpt_platform/frontend/src/components/contextual/SchedulesPanel/useSchedulesPanel.ts
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/SkillsPanel.tsx
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/components/EmptySkills/EmptySkills.tsx
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/components/SkillListItem/SkillListItem.tsx
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/components/SkillListItem/helpers.ts
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/components/SkillListItem/useSkillListItem.ts
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/components/UploadSkillButton/UploadSkillButton.tsx
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/components/UploadSkillButton/__tests__/getSkillUploadError.test.ts
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/components/UploadSkillButton/helpers.ts
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/components/UploadSkillButton/useUploadSkillButton.ts
  • autogpt_platform/frontend/src/components/contextual/SkillsPanel/useSkillsPanel.ts
  • autogpt_platform/frontend/src/components/contextual/guidedPrompts.ts
💤 Files with no reviewable changes (3)
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/tests/AttachmentMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/AttachmentMenu.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/skills/components/UploadSkillButton/UploadSkillButton.tsx

Comment thread autogpt_platform/frontend/src/components/contextual/guidedPrompts.ts Outdated
- Add parseAsStringLiteral to low-credit-banner nuqs mock (CI failure)
- Make CopilotPage.test nuqs mock key-aware so sessionId/modal don't conflate
- Fix "it's" -> "its" typo in NEW_SKILL_PROMPT user-facing copy
- Don't hide loaded schedules when only one source fails: hard error only
  when nothing loaded, non-blocking warning banner on partial failure
- Add regression tests for partial/full schedule fetch failure and for
  focus-on-consume of guided prompts in ChatInput

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@0ubbe

0ubbe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Addressed the outside-diff-range findings from @coderabbitai's review in 45bab6f8f:

  • Partial fetch failure hiding loaded schedules (useSchedulesPanel): a failed source is now a hard error only when there is nothing to show. When the other query loaded data, the list stays visible and a non-blocking warning banner (schedules-partial-error) is shown instead. Covered by two new tests (partial failure keeps data + warning; full failure keeps the ErrorCard).
  • Focus-on-consume regression test (useChatInput): added a test asserting the composer is prefilled and receives focus when a guided prompt arrives after mount.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
cd autogpt_platform/frontend 2>/dev/null || true
git show 45bab6f8fc308a7a0de288adacbdafda66a3922d --stat 2>/dev/null | head -50
echo "---schedules panel---"
git show 45bab6f8fc308a7a0de288adacbdafda66a3922d -- '*useSchedulesPanel.ts' 2>/dev/null
echo "---chat input test---"
git show 45bab6f8fc308a7a0de288adacbdafda66a3922d -- '*useChatInput*test*' 2>/dev/null

Length of output: 3893


@0ubbe Thanks for the fix — verified in commit 45bab6f. The useSchedulesPanel logic now correctly derives error only when schedules.length === 0 and exposes a separate partialError when data is present but one source failed, which addresses the concern about hiding loaded schedules on partial failure. The SchedulesPanel.tsx update to surface the schedules-partial-error banner and the new regression tests (partial/full failure, plus the useChatInput focus-on-consume test) look good.

0ubbe and others added 2 commits July 7, 2026 16:31
…still loading

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The menu structure is no longer gated by chat-workspace-files: the
popover always lists flat options and 'Use File from Workspace' simply
appears when its flag is on. ComposerPlusMenu now reads the flag itself
instead of taking a showWorkspaceOption prop.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx (2)

89-100: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplication across fixed menu items could be config-driven.

The three openModal(...) menu items follow an identical shape (icon + label + onSelect). Extracting a small array of { icon, label, modal } entries and mapping over it would reduce duplication if more actions are added later.

🤖 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
`@autogpt_platform/frontend/src/app/`(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
around lines 89 - 100, The fixed menu items in ComposerPlusMenu are duplicated
and should be driven by configuration instead of hardcoded repeated
DropdownMenuItem blocks. Refactor the Integrations, Skills, and Scheduled
entries into a small array of objects containing the icon, label, and modal key,
then map over that array inside the menu render so openModal stays the single
action handler and adding new items later is simpler.

29-105: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider extracting handlers into a useComposerPlusMenu hook.

The component mixes render JSX with business logic (openFilePicker, handleFileChange) and spans ~77 lines, exceeding the recommended ~50-line guideline for render functions/hooks.

As per coding guidelines: "Separate render logic from business logic using component.tsx + useComponent.ts + helpers.ts pattern, colocate state when possible and avoid creating large components" and "Keep render functions and hooks under ~50 lines; extract named helpers or sub-components when they grow longer."

🤖 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
`@autogpt_platform/frontend/src/app/`(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
around lines 29 - 105, The ComposerPlusMenu component is too large and mixes
rendering with file-picker logic, so extract the non-UI behavior into a
dedicated useComposerPlusMenu hook or helper. Move openFilePicker and
handleFileChange out of ComposerPlusMenu, keep the component focused on JSX, and
wire the hook outputs back into the existing DropdownMenuTrigger, file input,
and DropdownMenuItem handlers. Preserve the current behavior for
onFilesSelected, onUseWorkspaceFile, useCopilotModal, and useGetFlag while
reducing the render function size.

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.

Nitpick comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx:
- Around line 89-100: The fixed menu items in ComposerPlusMenu are duplicated
and should be driven by configuration instead of hardcoded repeated
DropdownMenuItem blocks. Refactor the Integrations, Skills, and Scheduled
entries into a small array of objects containing the icon, label, and modal key,
then map over that array inside the menu render so openModal stays the single
action handler and adding new items later is simpler.
- Around line 29-105: The ComposerPlusMenu component is too large and mixes
rendering with file-picker logic, so extract the non-UI behavior into a
dedicated useComposerPlusMenu hook or helper. Move openFilePicker and
handleFileChange out of ComposerPlusMenu, keep the component focused on JSX, and
wire the hook outputs back into the existing DropdownMenuTrigger, file input,
and DropdownMenuItem handlers. Preserve the current behavior for
onFilesSelected, onUseWorkspaceFile, useCopilotModal, and useGetFlag while
reducing the render function size.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cefb2ac6-54da-4678-bb97-bdebb3f06f77

📥 Commits

Reviewing files that changed from the base of the PR and between b53437f and 9006e87.

📒 Files selected for processing (3)
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
💤 Files with no reviewable changes (1)
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (8)
  • GitHub Check: check API types
  • GitHub Check: integration_test
  • GitHub Check: lint
  • GitHub Check: end-to-end tests
  • GitHub Check: Seer Code Review
  • GitHub Check: Analyze (typescript)
  • GitHub Check: Analyze (python)
  • GitHub Check: Check PR Status
🧰 Additional context used
📓 Path-based instructions (14)
autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}: Use Node.js 21+ with pnpm package manager for frontend development
Always run 'pnpm format' for formatting and linting code in frontend development

Format frontend code using pnpm format

autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}: Fully capitalize acronyms in symbols, e.g. graphID, useBackendAPI
No linter suppressors (// @ts-ignore``, // eslint-disable) — fix the actual issue

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/frontend/**/*.{tsx,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

autogpt_platform/frontend/**/*.{tsx,ts}: Use function declarations for components and handlers (not arrow functions) in React components
Only use arrow functions for small inline lambdas (map, filter, etc.) in React components
Use PascalCase for component names and camelCase with 'use' prefix for hook names in React
Use Tailwind CSS utilities only for styling in frontend components
Use design system components from 'src/components/' (atoms, molecules, organisms) in frontend development
Never use 'src/components/legacy/' in frontend code
Only use Phosphor Icons (@phosphor-icons/react) for icons in frontend components
Use generated API hooks from '@/app/api/__generated__/endpoints/' instead of deprecated 'BackendAPI' or 'src/lib/autogpt-server-api/
'
Use React Query for server state (via generated hooks) in frontend development
Default to client components ('use client') in Next.js; only use server components for SEO or extreme TTFB needs
Use '' component for rendering errors in frontend UI; use toast notifications for mutation errors; use 'Sentry.captureException()' for manual exceptions
Separate render logic from data/behavior in React components; keep comments minimal (code should be self-documenting)

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/frontend/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

autogpt_platform/frontend/**/*.{ts,tsx}: No barrel files or 'index.ts' re-exports in frontend code
Regenerate API hooks with 'pnpm generate:api' after backend OpenAPI spec changes in frontend development

autogpt_platform/frontend/**/*.{ts,tsx}: Use function declarations (not arrow functions) for components/handlers
No any types unless the value genuinely can be anything
Keep render functions and hooks under ~50 lines; extract named helpers or sub-components when they grow longer

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/frontend/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

autogpt_platform/frontend/src/**/*.{ts,tsx}: Use generated API hooks from @/app/api/__generated__/endpoints/ following the pattern use{Method}{Version}{OperationName}, and regenerate with pnpm generate:api
Separate render logic from business logic using component.tsx + useComponent.ts + helpers.ts pattern, colocate state when possible and avoid creating large components, use sub-components in local /components folder
Use function declarations for components and handlers, use arrow functions only for callbacks
Do not use useCallback or useMemo unless asked to optimise a given function

autogpt_platform/frontend/src/**/*.{ts,tsx}: Keep files under ~200 lines; extract sub-components or hooks into their own files when a file grows beyond this
Use generated API hooks from @/app/api/__generated__/endpoints/ with pattern use{Method}{Version}{OperationName}
Always import the -Icon-suffixed alias from @phosphor-icons/react (e.g. TrashIcon, PlusIcon, SquareIcon) — bare exports are deprecated
Do not use useCallback or useMemo unless asked to optimize a given function
Never use src/components/__legacy__/* — use design system components from src/components/

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/frontend/**/*.{tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use Tailwind CSS only for styling, use design tokens, and use Phosphor Icons only

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/frontend/src/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Component props should use interface Props { ... } (not exported) unless the interface needs to be used outside the component

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never type with any, if no types available use unknown

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/frontend/**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

autogpt_platform/frontend/**/*.{test,spec}.{ts,tsx}: Use Vitest + RTL + MSW for integration tests as the primary testing approach (~90%, page-level), use Playwright for E2E critical flows, and use Storybook for design system components
Run frontend integration tests with pnpm test:unit (Vitest + RTL + MSW)

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
autogpt_platform/frontend/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)

autogpt_platform/frontend/**/*.{tsx,jsx}: No dark: Tailwind classes — the design system handles dark mode
Use Next.js <Link> for internal navigation — never raw <a> tags
Use Tailwind CSS only for styling with design tokens and Phosphor Icons only

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/frontend/src/**/components/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)

Put sub-components in local components/ folder; component props should be type Props = { ... } (not exported) unless used outside the component

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/frontend/src/**/components/**/*.{ts,tsx}

📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)

Structure components as ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
autogpt_platform/frontend/src/app/**/__tests__/**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)

Write integration tests in __tests__/ next to page.tsx using Vitest + RTL + MSW for new pages/features

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
autogpt_platform/frontend/src/**/__tests__/**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)

Use Orval-generated MSW handlers from @/app/api/__generated__/endpoints/{tag}/{tag}.msw.ts for API mocking

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
autogpt_platform/frontend/src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (autogpt_platform/frontend/AGENTS.md)

Avoid index and barrel files

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
🧠 Learnings (12)
📚 Learning: 2026-02-27T10:45:49.499Z
Learnt from: majdyz
Repo: Significant-Gravitas/AutoGPT PR: 12213
File: autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunMCPTool/helpers.tsx:23-24
Timestamp: 2026-02-27T10:45:49.499Z
Learning: Prefer using generated OpenAPI types from '`@/app/api/__generated__/`' for payloads defined in openapi.json (e.g., MCPToolsDiscoveredResponse, MCPToolOutputResponse). Use inline TypeScript interfaces only for payloads that are SSE-stream-only and not exposed via OpenAPI. Apply this pattern to frontend tool components (e.g., RunMCPTool) and related areas where similar SSE/openapi-discrepancies occur; avoid re-implementing types when a generated type is available.

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-03-24T02:05:04.672Z
Learnt from: majdyz
Repo: Significant-Gravitas/AutoGPT PR: 12526
File: autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx:0-0
Timestamp: 2026-03-24T02:05:04.672Z
Learning: When gating React component logic on a React Query result (e.g., hooks like `useQuery` / `useGetV2GetCopilotUsage`), prefer destructuring and checking `isSuccess` (or aliasing it to a meaningful boolean like `isSuccess: hasUsage`) instead of relying on `!isLoading`. Reason: `isLoading` can be `false` in error/idle states where `data` may still be `undefined`, while `isSuccess` indicates the query completed successfully and `data` is populated.

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-03-24T02:23:31.305Z
Learnt from: majdyz
Repo: Significant-Gravitas/AutoGPT PR: 12526
File: autogpt_platform/frontend/src/app/(platform)/copilot/components/RateLimitResetDialog/RateLimitResetDialog.tsx:0-0
Timestamp: 2026-03-24T02:23:31.305Z
Learning: In the Copilot platform UI code, follow the established Orval hook `onError` error-handling convention: first explicitly detect/handle `ApiError`, then read `error.response?.detail` (if present) as the primary message; if not available, fall back to `error.message`; and finally fall back to a generic string message. This convention should be used for generated Orval hooks even if the custom Orval mutator already maps details into `ApiError.message`, to keep consistency across hooks/components (e.g., `useCronSchedulerDialog.ts`, `useRunGraph.ts`, and rate-limit/reset flows).

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-03-31T14:04:42.444Z
Learnt from: majdyz
Repo: Significant-Gravitas/AutoGPT PR: 12623
File: autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx:172-177
Timestamp: 2026-03-31T14:04:42.444Z
Learning: In the Copilot frontend components under autogpt_platform/frontend/src/app/(platform)/copilot/, Tailwind dark mode variants (e.g., `dark:*`) are intentional and should be allowed. Do not flag `dark:` utilities in these Copilot UI components as incorrect; they are used to ensure proper contrast and correct behavior in both light and dark themes.

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-04-01T18:54:16.035Z
Learnt from: Bentlybro
Repo: Significant-Gravitas/AutoGPT PR: 12633
File: autogpt_platform/frontend/src/app/(platform)/library/components/AgentFilterMenu/AgentFilterMenu.tsx:3-10
Timestamp: 2026-04-01T18:54:16.035Z
Learning: In the frontend, the legacy Select component at `@/components/__legacy__/ui/select` is an intentional, codebase-wide visual-consistency pattern. During code reviews, do not flag or block PRs merely for continuing to use this legacy Select. If a migration to the newer design-system Select is desired, bundle it into a single dedicated cleanup/migration PR that updates all Select usages together (e.g., avoid piecemeal replacements).

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-04-07T09:24:16.582Z
Learnt from: 0ubbe
Repo: Significant-Gravitas/AutoGPT PR: 12686
File: autogpt_platform/frontend/src/app/(no-navbar)/onboarding/steps/__tests__/PainPointsStep.test.tsx:1-19
Timestamp: 2026-04-07T09:24:16.582Z
Learning: In Significant-Gravitas/AutoGPT’s `autogpt_platform/frontend` (Vite + `vitejs/plugin-react` with the automatic JSX transform), do not flag usages of React types/components (e.g., `React.ReactNode`) in `.ts`/`.tsx` files as missing `React` imports. Since the React namespace is made available by the project’s TS/Vite setup, an explicit `import React from 'react'` or `import type { ReactNode } ...` is not required; only treat it as missing if typechecking (e.g., `pnpm types`) would actually fail.

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-04-02T05:43:49.128Z
Learnt from: 0ubbe
Repo: Significant-Gravitas/AutoGPT PR: 12640
File: autogpt_platform/frontend/src/app/(no-navbar)/onboarding/steps/WelcomeStep.tsx:13-13
Timestamp: 2026-04-02T05:43:49.128Z
Learning: Do not flag `import { Question } from "phosphor-icons/react"` as an invalid import. `Question` is a valid named export from `phosphor-icons/react` (as reflected in the package’s generated `.d.ts` files and re-exports via `dist/index.d.ts`), so it should be treated as a supported named export during code reviews.

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-04-13T13:11:07.445Z
Learnt from: 0ubbe
Repo: Significant-Gravitas/AutoGPT PR: 12764
File: autogpt_platform/frontend/src/app/(platform)/library/components/SitrepItem/SitrepItem.tsx:143-145
Timestamp: 2026-04-13T13:11:07.445Z
Learning: In `autogpt_platform/frontend`, do not flag direct interpolation of `executionID` UUID strings into URL query parameters (e.g., `activeItem=${executionID}` in JSX/Next links). If the value is a UUID string matching `[0-9a-f-]`, it contains no reserved URL characters, so additional `encodeURIComponent` or Next.js object-based `href` encoding is unnecessary. Only treat it as an encoding issue if the query-param value is not guaranteed to be UUID-formatted (i.e., may include characters outside `[0-9a-f-]`).

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-04-15T22:49:06.896Z
Learnt from: ntindle
Repo: Significant-Gravitas/AutoGPT PR: 11235
File: autogpt_platform/frontend/src/app/(platform)/admin/diagnostics/components/ExecutionsTable.tsx:0-0
Timestamp: 2026-04-15T22:49:06.896Z
Learning: In the AutoGPT frontend (React Query + toast/ErrorCard patterns), do not require `Sentry.captureException` in React Query mutation `catch` blocks. React Query handles error propagation for mutation paths, so follow the established pattern: show toast notifications for mutation errors and use `ErrorCard` for render/fetch errors. Only add `Sentry.captureException` for truly manual/unexpected exception paths that are outside React Query’s control (e.g., standalone async utilities or event handlers not wired through React Query).

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-07-03T04:19:11.799Z
Learnt from: Abhi1992002
Repo: Significant-Gravitas/AutoGPT PR: 13474
File: autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsx:38-38
Timestamp: 2026-07-03T04:19:11.799Z
Learning: When reviewing Tailwind usage in .tsx components, allow intentional raw hex color values if they exactly match the design-spec and there is no equivalent Tailwind design token/utility class available (e.g., a utility like `bg-zinc-50` may be a different shade than the required `#f9f9f9`). Do not flag these as "design-token violations" as long as the reviewer can confirm that an appropriate Tailwind token does not exist or would not match the exact color.

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx
📚 Learning: 2026-04-20T13:17:39.951Z
Learnt from: 0ubbe
Repo: Significant-Gravitas/AutoGPT PR: 12854
File: autogpt_platform/frontend/src/app/(platform)/library/__tests__/briefing.test.tsx:84-84
Timestamp: 2026-04-20T13:17:39.951Z
Learning: In the AutoGPT frontend, `testing-library/react` cleanup is already handled globally after each test via `src/tests/integrations/vitest.setup.tsx`. Therefore, for integration test files under `__tests__/`, do NOT add redundant `afterEach(() => cleanup())`. Only add local `afterEach` teardown for resources that are not covered globally—specifically, when using fake timers, add `afterEach(() => vi.useRealTimers())` (or equivalent) to restore real timers and prevent cross-test interference.

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
📚 Learning: 2026-04-20T20:07:22.981Z
Learnt from: ntindle
Repo: Significant-Gravitas/AutoGPT PR: 11235
File: autogpt_platform/frontend/src/app/(platform)/admin/diagnostics/__tests__/ExecutionsTable.test.tsx:27-76
Timestamp: 2026-04-20T20:07:22.981Z
Learning: In this codebase, Orval-generated API modules under `src/app/api/__generated__/` are not committed to git and must be generated via `pnpm generate:api` (requires a running backend). In integration tests, it’s acceptable—and expected—to stub generated hooks/modules by mocking them with `vi.mock("`@/app/api/__generated__/endpoints/`{tag}/{tag}")`. Do not treat `vi.mock` of these generated hook modules as a violation of the MSW handler guideline, since the corresponding MSW handlers cannot be imported at test time when generated files are absent.

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx
🔇 Additional comments (2)
autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx (1)

1-27: LGTM!

Also applies to: 36-36, 38-88, 101-105

autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ComposerPlusMenu.test.tsx (1)

1-111: LGTM!

@0ubbe

0ubbe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Re @coderabbitai nitpicks on ComposerPlusMenu — addressed in 29c677839:

  • Extract useComposerPlusMenu hook: done — file-picker logic (openFilePicker, handleFileChange), modal opener and flag read now live in useComposerPlusMenu.ts; the component is JSX-only and under the size guideline.
  • Config-driven menu items: skipped — mapping over a 3-entry {icon, label, modal} array adds indirection without reducing real duplication at this size; the flat JSX stays easier to scan. Happy to revisit if the menu grows.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
cd autogpt_platform/frontend 2>/dev/null || true
git show 29c677839a9e570cbaed07254fe1cedbe25b23d4 --stat 2>/dev/null | head -50
echo "---hook---"
git show 29c677839a9e570cbaed07254fe1cedbe25b23d4 -- '*useComposerPlusMenu*' 2>/dev/null
echo "---component---"
git show 29c677839a9e570cbaed07254fe1cedbe25b23d4 -- '*ComposerPlusMenu.tsx' 2>/dev/null

Length of output: 4881


@0ubbe Confirmed in commit 29c6778useComposerPlusMenu now cleanly owns the file-picker ref/handlers, modal opener, and feature-flag read, while ComposerPlusMenu.tsx is reduced to JSX composition using the hook's returned values. That resolves the size/separation-of-concerns nitpick.

Agreed on skipping the config-driven items refactor — with only three fixed menu entries, a mapped array wouldn't meaningfully reduce duplication and would add a layer of indirection for readers. The flat JSX is fine here; worth revisiting only if the menu grows beyond a handful of items.

@0ubbe

0ubbe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

!deploy

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploying PR #13489 to development environment...

0ubbe and others added 4 commits July 9, 2026 21:09
- Guided prompts now always replace the composer draft (picking New
  scheduled task after New skill swaps the text instead of keeping the
  stale prompt)
- Attach file / Use File from Workspace / Integrations clear an
  untouched guided prompt; user-edited drafts are never cleared
- "+" button tooltip is now "Add files and more"
- User-facing "copilot" copy in the Scheduled/Skills panels switched to
  "AutoPilot"

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nu mock in ChatInput tests

ChatInput tests mock ComposerPlusMenu entirely, so the real dropdown
never renders there. The mock now exposes onClearGuidedPrompt; which
menu items trigger it is covered by ComposerPlusMenu.test.tsx.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@0ubbe

0ubbe commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

!deploy

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deploying PR #13489 to development environment...

@0ubbe
0ubbe requested review from Abhi1992002 and ntindle July 10, 2026 13:23
@github-project-automation github-project-automation Bot moved this from 🆕 Needs initial review to 👍🏼 Mergeable in AutoGPT development kanban Jul 10, 2026
@0ubbe
0ubbe merged commit 0ba6ad8 into dev Jul 13, 2026
35 checks passed
@0ubbe
0ubbe deleted the feat/copilot-plus-menu branch July 13, 2026 06:37
@github-project-automation github-project-automation Bot moved this to Done in Frontend Jul 13, 2026
@github-project-automation github-project-automation Bot moved this from 👍🏼 Mergeable to ✅ Done in AutoGPT development kanban Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Auto-undeploying: PR closed with active deployment. Cleaning up development environment for PR #13489.

@0ubbe

0ubbe commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

🧹 Preview Environment Cleaned Up

All resources for PR #13489 have been removed:

  • ☸️ Kubernetes namespace deleted
  • 🗃️ Preview branch database deleted

Cleanup completed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/frontend AutoGPT Platform - Front end size/xl

Projects

Status: ✅ Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants