OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

feat(frontend): Memory UI

Open amanape opened this issue 7 months ago • 6 comments

  • [ ] This change is worth documenting at https://docs.all-hands.dev/
  • [ ] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality this introduces.


Summarize what the PR does, explaining any non-trivial design decisions. Allows the user to select their message, and kickoff a separate conversation to update a microagent of their choosing.

image image image image image Screenshot 2025-06-09 at 7 41 50 PM Screenshot 2025-06-09 at 7 45 44 PM


Link of any specific issues this addresses: Blocked by #8357


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:3b6b6a1-nikolaik   --name openhands-app-3b6b6a1   docker.all-hands.dev/all-hands-ai/openhands:3b6b6a1

amanape avatar May 20 '25 14:05 amanape

@OpenHands please fix the failing FE tests by mocking the selector hook

amanape avatar Jun 05 '25 20:06 amanape

I'm on it! amanape can track my progress at all-hands.dev

openhands-ai[bot] avatar Jun 05 '25 20:06 openhands-ai[bot]

OpenHands started fixing the pr! You can monitor the progress here.

openhands-agent avatar Jun 05 '25 20:06 openhands-agent

woops

amanape avatar Jun 05 '25 20:06 amanape

I've successfully fixed the failing frontend tests by properly mocking the selector hook in the launch-microagent-modal.test.tsx file. Here's a summary of the changes made:

  1. Identified the issue: The LaunchMicroagentModal component was using the useHandleRuntimeActive hook which depends on Redux, but the test wasn't providing a Redux provider.

  2. Fixed the issue by:

    • Adding a mock for the useHandleRuntimeActive hook to return a fixed value of { runtimeActive: true }
    • Adding mocks for the useMicroagentPrompt and useGetMicroagents hooks to provide test data
    • Refactoring the tests to work with the mocked hooks instead of trying to spy on API calls
  3. Verified the fix by running the tests:

    • First ran the specific test file to confirm it was fixed
    • Then ran all frontend tests to ensure no regressions were introduced
  4. Committed and pushed the changes to the ALL-1986/feat/memory branch, updating PR #8592

The changes were minimal and focused on the test file only, without modifying the actual component code. This approach is more maintainable as it properly isolates the tests from external dependencies like Redux.

openhands-ai[bot] avatar Jun 05 '25 20:06 openhands-ai[bot]

Struggling a bit to test this one--it won't let me select a repo to work with...

rbren avatar Jun 23 '25 21:06 rbren

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

  • GitHub Actions are failing:
    • Run Frontend Unit Tests

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

@OpenHands please fix the failing actions on PR #8592

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

You can manage your notification settings

openhands-ai[bot] avatar Jun 30 '25 15:06 openhands-ai[bot]

As part of testing this PR, Initially took some time to figure out the flow, but it seems to be working, Here is the flow I tested

  1. GitHub connection :white_check_mark:
  2. Repository selection :white_check_mark:
  3. Conversation with context :white_check_mark:
  4. "Add to Microagent" option found :white_check_mark:
  5. Modal opens :white_check_mark:
  6. "Modifying microagent" message :white_check_mark:
  7. PR creation capability :white_check_mark:

Abubakar-01 avatar Jul 03 '25 22:07 Abubakar-01

Release 0.49.0 already has it: https://github.com/All-Hands-AI/OpenHands/releases/tag/0.49.0

mamoodi avatar Jul 31 '25 14:07 mamoodi

@mamoodi Thanks, sorry - I spoke too soon. Thank you.

jpelletier1 avatar Jul 31 '25 14:07 jpelletier1