Skip to content

Make CoPilot todo/task list card expanded by default - #12168

Merged
Abhi1992002 merged 1 commit into
devfrom
otto/secrt-2017-make-copilot-todotask-list-card-expanded-by-default
Feb 20, 2026
Merged

Make CoPilot todo/task list card expanded by default#12168
Abhi1992002 merged 1 commit into
devfrom
otto/secrt-2017-make-copilot-todotask-list-card-expanded-by-default

Conversation

@Otto-AGPT

Copy link
Copy Markdown
Contributor

The todo card rendered by GenericTool was collapsed by default, requiring users to click to see their checklist items. Now passes defaultExpanded when the category is "todo" so the task list is immediately visible.

File changed: autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx

Resolves SECRT-2017

The todo card rendered by GenericTool was collapsed by default, requiring
users to click to see their checklist items. Now passes defaultExpanded
when the category is "todo" so the task list is immediately visible.

Resolves SECRT-2017
@Otto-AGPT
Otto-AGPT requested a review from a team as a code owner February 19, 2026 16:24
@Otto-AGPT
Otto-AGPT requested review from Bentlybro and Pwuts and removed request for a team February 19, 2026 16:24
@github-project-automation github-project-automation Bot moved this to 🆕 Needs initial review in AutoGPT development kanban Feb 19, 2026
@github-actions github-actions Bot added the platform/frontend AutoGPT Platform - Front end label Feb 19, 2026
@github-actions

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.

🟢 Low Risk — File Overlap Only

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

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


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

@coderabbitai

coderabbitai Bot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between aeca4db and 1717d6c.

📒 Files selected for processing (1)
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx
🧰 Additional context used
📓 Path-based instructions (9)
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

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.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/tools/GenericTool/GenericTool.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

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx
autogpt_platform/frontend/src/**/*.{ts,tsx}

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

autogpt_platform/frontend/src/**/*.{ts,tsx}: Fully capitalize acronyms in symbols, e.g. graphID, useBackendAPI
Use function declarations (not arrow functions) for components and handlers
Separate render logic (.tsx) from business logic (use*.ts hooks)
Use shadcn/ui (Radix UI primitives) with Tailwind CSS styling for UI components
Use Phosphor Icons only for icons
Use ErrorCard for render errors, toast for mutations, and Sentry for exceptions
Use design system components from src/components/ (atoms, molecules, organisms)
Never use src/components/__legacy__/* components
Use generated API hooks from @/app/api/__generated__/endpoints/ with pattern use{Method}{Version}{OperationName}
Use Tailwind CSS only for styling, with design tokens
Do not use useCallback or useMemo unless asked to optimize a given function
Never type with any unless a variable/attribute can ACTUALLY be of any type

autogpt_platform/frontend/src/**/*.{ts,tsx}: Structure components as ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts and use design system components from src/components/ (atoms, molecules, organisms)
Use generated API hooks from @/app/api/__generated__/endpoints/ with pattern use{Method}{Version}{OperationName} and regenerate with pnpm generate:api
Use function declarations (not arrow functions) for components and handlers
Separate render logic from business logic with component.tsx + useComponent.ts + helpers.ts structure
Colocate state when possible, avoid creating large components, use sub-components in local /components folder
Avoid large hooks, abstract logic into helpers.ts files when sensible
Use arrow functions only for callbacks, not for component declarations
Avoid comments at all times unless the code is very complex
Do not use useCallback or useMemo unless asked to optimize a given function

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx
autogpt_platform/frontend/src/**/*.tsx

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

Component props should be type Props = { ... } (not exported) unless it needs to be used outside the component

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

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}: Format frontend code using pnpm format
Never use components from src/components/__legacy__/*

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx
autogpt_platform/frontend/**/*.{js,jsx,ts,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/tools/GenericTool/GenericTool.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/tools/GenericTool/GenericTool.tsx
autogpt_platform/frontend/src/app/(platform)/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

If adding protected frontend routes, update frontend/lib/supabase/middleware.ts

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx
🧠 Learnings (1)
📚 Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.tsx : Component props should be `type Props = { ... }` (not exported) unless it needs to be used outside the component

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Seer Code Review
  • GitHub Check: types
  • GitHub Check: Analyze (typescript)
  • GitHub Check: Analyze (python)
  • GitHub Check: end-to-end tests
  • GitHub Check: Check PR Status
🔇 Additional comments (1)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx (1)

707-707: Verified — ToolAccordion correctly accepts defaultExpanded prop.

ToolAccordion declares defaultExpanded?: boolean in its Props interface (line 16), and the usage at line 707 with defaultExpanded={category === "todo"} is correct. The expression evaluates to true when rendering the todo accordion and false for all other categories, and the uncontrolled default-open prop correctly respects manual collapse. All coding guidelines are followed.


Walkthrough

A single prop addition to the ToolAccordion component in GenericTool renders the todo category accordion expanded by default, addressing a UI preference for the CoPilot todo/task list card display.

Changes

Cohort / File(s) Summary
Todo Accordion Default State
autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx
Added defaultExpanded prop to ToolAccordion component to render todo category accordion expanded by default.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • Significant-Gravitas/AutoGPT#12054: Removes defaultExpanded prop across multiple tool accordions while this PR adds it to todo accordion—represents opposite modifications to the same component property.

Suggested labels

platform/frontend, size/m

Suggested reviewers

  • Pwuts
  • Bentlybro

Poem

🐰 A single line, a humble change,
Yet todos bloom in expanded range!
No folding now, the tasks appear,
Ready to work without a fear!
*bounces contentedly*

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: making the CoPilot todo/task list card expanded by default.
Description check ✅ Passed The description clearly explains the problem and solution, detailing which file was changed and the outcome of the fix.
Linked Issues check ✅ Passed The code changes directly implement the requirement from SECRT-2017 by passing defaultExpanded prop when category is 'todo'.
Out of Scope Changes check ✅ Passed All changes are focused on the single objective of making the todo card expanded by default; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch otto/secrt-2017-make-copilot-todotask-list-card-expanded-by-default

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

greptile-apps Bot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Added defaultExpanded={category === "todo"} prop to the ToolAccordion component in GenericTool.tsx so that todo/task list cards are expanded by default, improving UX by making checklist items immediately visible without requiring a click.

  • Simple, targeted change that improves user experience
  • Follows existing pattern where category is already being checked for todo-specific behavior
  • The ToolAccordion component already supports the defaultExpanded prop via its useToolAccordion hook
  • No other tool categories are affected by this change

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Single-line change with clear purpose and no side effects. The change is a simple boolean prop addition that only affects todo category accordions. The defaultExpanded prop is already supported by the ToolAccordion component, and the conditional logic follows existing patterns in the codebase.
  • No files require special attention

Last reviewed commit: 1717d6c

@Torantulino
Torantulino requested review from 0ubbe and Abhi1992002 and removed request for Pwuts February 19, 2026 16:28
@github-project-automation github-project-automation Bot moved this from 🆕 Needs initial review to 👍🏼 Mergeable in AutoGPT development kanban Feb 20, 2026
@Abhi1992002
Abhi1992002 added this pull request to the merge queue Feb 20, 2026
Merged via the queue into dev with commit 7718c49 Feb 20, 2026
24 checks passed
@Abhi1992002
Abhi1992002 deleted the otto/secrt-2017-make-copilot-todotask-list-card-expanded-by-default branch February 20, 2026 05:52
@github-project-automation github-project-automation Bot moved this from 👍🏼 Mergeable to ✅ Done in AutoGPT development kanban Feb 20, 2026
@github-project-automation github-project-automation Bot moved this to Done in Frontend Feb 20, 2026
jayvenn21 pushed a commit to jayvenn21/AutoGPT that referenced this pull request Feb 20, 2026
…vitas#12168)

The todo card rendered by GenericTool was collapsed by default,
requiring users to click to see their checklist items. Now passes
`defaultExpanded` when the category is `"todo"` so the task list is
immediately visible.

**File changed:**
`autogpt_platform/frontend/src/app/(platform)/copilot/tools/GenericTool/GenericTool.tsx`

Resolves [SECRT-2017](https://linear.app/autogpt/issue/SECRT-2017)
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/xs

Projects

Status: ✅ Done
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants