Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor: have single source of truth#1630

Merged
tusharmath merged 20 commits into
mainfrom
ui-state-refac
Oct 2, 2025
Merged

refactor: have single source of truth#1630
tusharmath merged 20 commits into
mainfrom
ui-state-refac

Conversation

@tusharmath

@tusharmath tusharmath commented Oct 2, 2025

Copy link
Copy Markdown
Collaborator

fixes #1632

@github-actions github-actions Bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Oct 2, 2025
@tusharmath tusharmath changed the title refactor: remove operating_agent from UIState and update related implementations to retrieve it from API refactor: have single source of truth Oct 2, 2025
Comment on lines +55 to +57
pub fn into_feedback(mut self) -> Self {
self.event.name = format!("{}/{}", self.event.name, EVENT_USER_TASK_UPDATE);
self

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.

Consider adding a check to prevent duplicate suffixes in into_feedback(). Currently, if this method is called multiple times on the same object, it will repeatedly append the EVENT_USER_TASK_UPDATE suffix to the event name. A simple guard condition would prevent this:

pub fn into_feedback(mut self) -> Self {
    if !self.event.name.ends_with(EVENT_USER_TASK_UPDATE) {
        self.event.name = format!("{}/{}", self.event.name, EVENT_USER_TASK_UPDATE);
    }
    self
}

The same issue applies to the into_task() method.

Suggested change
pub fn into_feedback(mut self) -> Self {
self.event.name = format!("{}/{}", self.event.name, EVENT_USER_TASK_UPDATE);
self
pub fn into_feedback(mut self) -> Self {
if !self.event.name.ends_with(EVENT_USER_TASK_UPDATE) {
self.event.name = format!("{}/{}", self.event.name, EVENT_USER_TASK_UPDATE);
}
self

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@openhands-ai

openhands-ai Bot commented Oct 2, 2025

Copy link
Copy Markdown

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • autofix.ci
    • ci

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #1630 at branch `ui-state-refac`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@tusharmath tusharmath enabled auto-merge (squash) October 2, 2025 11:22
@tusharmath tusharmath merged commit d73eb15 into main Oct 2, 2025
9 checks passed
@tusharmath tusharmath deleted the ui-state-refac branch October 2, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Routine tasks like conversions, reorganization, and maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: subsequent messages are going in as task and not feedback

1 participant