Skip to content

Fix: Hide the reset button on the embedded page that is in conversation - #18153

Merged
wangq8 merged 2 commits into
infiniflow:mainfrom
cike8899:feat-structure-wiki
Aug 12, 2026
Merged

Fix: Hide the reset button on the embedded page that is in conversation#18153
wangq8 merged 2 commits into
infiniflow:mainfrom
cike8899:feat-structure-wiki

Conversation

@cike8899

Copy link
Copy Markdown
Contributor

Summary

Fix: Hide the reset button on the embedded page that is in conversation

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. 🧰 typescript Pull requests that update Typescript code labels Aug 12, 2026
@cike8899
cike8899 requested a review from wangq8 August 12, 2026 06:20
@cike8899
cike8899 marked this pull request as draft August 12, 2026 06:20
@cike8899
cike8899 marked this pull request as ready for review August 12, 2026 06:20
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

EmbedContainer now supports conditional Reset button visibility. Agent and next-chats share pages hide the button while sendLoading is active. Existing reset behavior remains unchanged when hideReset is false.

Changes

Conditional Reset Control

Layer / File(s) Summary
EmbedContainer reset visibility
web/src/components/embed-container.tsx
Adds the optional hideReset prop with a default of false. The Reset button renders only when the prop is false.
Share page loading integration
web/src/pages/agent/share/index.tsx, web/src/pages/next-chats/share/index.tsx
Passes sendLoading to EmbedContainer.hideReset on both share pages.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

I’m a rabbit with a reset-free view,
While sending messages hop right through.
The button hides, the flow stays bright,
Then returns when timing’s right.
Carrots and clean props unite!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly describes the primary change: hiding the reset button on an embedded conversation page.
Description check ✅ Passed The description includes the required Summary heading and briefly states the purpose of the change.

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.

@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 (1)
web/src/components/embed-container.tsx (1)

59-70: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add focused coverage for both reset states.

Render EmbedContainer with hideReset={true} and hideReset={false}. Assert that the Reset button is absent in the first case and present in the second case. Also assert that handleReset still runs when the button is present.

As per coding guidelines: “Preserve still-valid behavior with focused tests, but remove tests that protect obsolete behavior.”

🤖 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 `@web/src/components/embed-container.tsx` around lines 59 - 70, Add focused
tests for EmbedContainer covering both hideReset states: assert the Reset button
is absent when hideReset is true, present when false, and invokes handleReset
when clicked in the visible case. Remove or avoid any tests that only preserve
obsolete behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@web/src/components/embed-container.tsx`:
- Around line 59-70: Add focused tests for EmbedContainer covering both
hideReset states: assert the Reset button is absent when hideReset is true,
present when false, and invokes handleReset when clicked in the visible case.
Remove or avoid any tests that only preserve obsolete behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 39acea69-5aa2-4120-9cdd-7262c976f1b3

📥 Commits

Reviewing files that changed from the base of the PR and between 1b02abd and a5a5797.

📒 Files selected for processing (3)
  • web/src/components/embed-container.tsx
  • web/src/pages/agent/share/index.tsx
  • web/src/pages/next-chats/share/index.tsx

@cike8899
cike8899 marked this pull request as draft August 12, 2026 06:26
@cike8899 cike8899 added the ci Continue Integration label Aug 12, 2026
@cike8899
cike8899 marked this pull request as ready for review August 12, 2026 06:26
@cike8899
cike8899 marked this pull request as draft August 12, 2026 06:26
@cike8899
cike8899 marked this pull request as ready for review August 12, 2026 06:26

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this fix! Clean and minimal change.

What I verified:

  • The hideReset prop defaults to false, so existing EmbedContainer callers are unaffected.
  • sendLoading is the right condition — it correctly hides the reset button only while a message is in flight, preventing accidental resets mid-conversation.
  • Applied consistently to both share pages (agent/share and next-chats/share).

No issues found. LGTM 🚀

@wangq8 wangq8 added ci Continue Integration and removed ci Continue Integration labels Aug 12, 2026
@wangq8
wangq8 merged commit 6152f7e into infiniflow:main Aug 12, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:S This PR changes 10-29 lines, ignoring generated files. 🧰 typescript Pull requests that update Typescript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants