Skip to content

feat(frontend): Consume seeded attachments when a session starts - #5776

Closed
ardaerzin wants to merge 1 commit into
oss/sessions-pagefrom
oss/seed-attachments
Closed

feat(frontend): Consume seeded attachments when a session starts#5776
ardaerzin wants to merge 1 commit into
oss/sessions-pagefrom
oss/seed-attachments

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

Context

Top lane of the stack. Home and the overview collect attachments on the task composer (lane oss/home-overview), but nothing consumed them: a session started with files silently dropped them.

Changes

The conversation reads the first-run seed and sends the collected attachments with the opening message. This is the last step of the seeding flow; the composers below already collect into the seed state.

Tests / notes

  • Two files (AgentConversation, useFirstRunSeed). @agenta/oss tsc adds nothing on this lane.

What to QA

  • On Home, attach a file to the task composer and start a session: the opening message carries the attachment and the agent can read it.
  • Same from an agent's overview composer.
  • Regression: starting a session without attachments still opens normally.

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 6, 2026
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 6, 2026 9:00pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 239eb9d7-2173-4d62-8175-84a35a3d01f7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved first-run chat setup by automatically adding files selected from the overview or Home screen as attachments.
    • Ensured seeded files are matched to the correct chat scope.
    • Prevented messages from sending before selected files finish attaching.
    • Enabled automatic sending for first-run prompts that contain no text.

Walkthrough

The first-run seed flow now matches seeds by chat scope, stages seeded files through conversation attachments, and waits for attachment processing before auto-send. Empty-string prompts can also trigger auto-send.

Changes

First-run seed handling

Layer / File(s) Summary
Scope-aware seed staging
web/oss/src/components/AgentChatSlice/hooks/useFirstRunSeed.ts, web/oss/src/components/AgentChatSlice/AgentConversation.tsx
useFirstRunSeed accepts the chat scope, stages seeded files, and clears the seed after processing. AgentConversation connects the file callback to attachments.addFiles.
Settled seed auto-send
web/oss/src/components/AgentChatSlice/hooks/useFirstRunSeed.ts
Auto-send accepts empty-string prompts and waits for seeded attachments to settle before submission.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: enabling the conversation to consume attachments from the seed when a session starts.
Description check ✅ Passed The description explains the context, changes, and testing scope, all related to the changeset of consuming seeded attachments on session start.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch oss/seed-attachments

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.

@dosubot dosubot Bot added feature request New feature or request frontend labels Aug 6, 2026
@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 75f51814-72c5-49c7-86d3-fea968583a97

📥 Commits

Reviewing files that changed from the base of the PR and between 5e5c376 and a63ab02.

📒 Files selected for processing (2)
  • web/oss/src/components/AgentChatSlice/AgentConversation.tsx
  • web/oss/src/components/AgentChatSlice/hooks/useFirstRunSeed.ts

Comment thread web/oss/src/components/AgentChatSlice/hooks/useFirstRunSeed.ts
Comment thread web/oss/src/components/AgentChatSlice/hooks/useFirstRunSeed.ts
@ardaerzin
ardaerzin force-pushed the oss/seed-attachments branch from a63ab02 to 26bd079 Compare August 6, 2026 10:37
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Aug 6, 2026
@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

…versation

The conversation reads the first-run seed and sends the attachments Home and the overview collected with the opening message. This is the last step of the seeding flow; the composers below already collect into the seed state.
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 9, 2026
@mmabrouk

mmabrouk commented Aug 9, 2026

Copy link
Copy Markdown
Member

Landed in release/v0.112.0 as part of the 0.112.0 release. The release branch now contains this work at commit ae71a92. Closing here since there is nothing left to merge.

@mmabrouk mmabrouk closed this Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request frontend lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants