Skip to content

Add shortcut to open up current running session on task #938#940

Closed
Kuldeep2822k wants to merge 2 commits intohumanlayer:mainfrom
Kuldeep2822k:main
Closed

Add shortcut to open up current running session on task #938#940
Kuldeep2822k wants to merge 2 commits intohumanlayer:mainfrom
Kuldeep2822k:main

Conversation

@Kuldeep2822k
Copy link
Copy Markdown

@Kuldeep2822k Kuldeep2822k commented Jan 13, 2026

added Feature from issue tab (used jules for confirmation)
cmd+enter on a task should open up the current running session/the latest in the RPI workflow. Right now you have to focus+enter to go into task, then focus+enter to go into session

What user-facing changes did I ship?
Added a new keyboard shortcut: Cmd+Enter (macOS) or Ctrl+Enter (Windows/Linux).
When a Task event is focused in the conversation stream, pressing this shortcut will immediately navigate to the child session associated with that task.
If no corresponding child session is found, a toast notification ("No sub-session found for this task") is displayed.
How I implemented it
I updated humanlayer-wui/src/components/internal/SessionDetail/hooks/useSessionNavigation.ts:

Imported useNavigate from react-router-dom and useStore from the app store.
Added a new useHotkeys listener for meta+enter, ctrl+enter.
Implemented logic to find the correct child session:
It identifies the currently focused event.
It checks if the event is a "Task" tool call.
It searches the global sessions list for a session where parentSessionId equals the current session's ID and the creation time is at or after the task's creation time.
It navigates to the earliest matching session found.
How to verify it
Open the Web UI and navigate to a session that has spawned sub-agents (Tasks).
Use j/k keys or hover to focus on the "Task" event in the conversation stream.
Press Cmd+Enter (or Ctrl+Enter).
The application should navigate to the details page of the child session.
I have ensured make check test passes (Ran tsc locally to verify type safety).


Important

Add Cmd+Enter/Ctrl+Enter shortcut to open child session from Task event in useSessionNavigation.ts.

  • Feature:
    • Added Cmd+Enter (macOS) or Ctrl+Enter (Windows/Linux) shortcut in useSessionNavigation to open child session from a focused Task event.
    • Displays toast notification if no child session is found.
  • Implementation:
    • Imported useNavigate from react-router-dom and useStore from AppStore in useSessionNavigation.ts.
    • Added logic to find child session by matching parentSessionId and createdAt.
  • Verification:
    • Ensure navigation to child session works when Task event is focused.
    • Displays error toast if no sub-session is found.

This description was created by Ellipsis for 890f3ae. You can customize this summary. It will automatically update as commits are pushed.

google-labs-jules bot and others added 2 commits January 13, 2026 14:06
This change adds a keyboard shortcut (Cmd+Enter or Ctrl+Enter) to the session detail view. When a task event is focused, pressing this shortcut will attempt to find and navigate to the child session associated with that task (e.g. an RPI workflow sub-session).

It uses a heuristic to find the related session:
1. Matches `parentSessionId` to the current session.
2. Ensures the session was created after the task event started.
3. Selects the earliest matching session (closest to the task event).

This improves navigation efficiency for users working with agentic workflows.
Add shortcut to open sub-session fromcmd+enter on a task should open up the current running session/the latest in the RPI workflow. Right now you have to focus+enter to go into task, then focus+enter to go into session task
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 13, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Kuldeep2822k
❌ google-labs-jules[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 890f3ae in 2 minutes and 9 seconds. Click for details.
  • Reviewed 65 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. humanlayer-wui/src/components/internal/SessionDetail/hooks/useSessionNavigation.ts:330
  • Draft comment:
    The logic for selecting a related session sorts sessions by creation time in ascending order (choosing the earliest session on/after the task's creation). Please confirm that this is the intended behavior for opening the 'current running session'—if the intent is to navigate to the most recent session, you may need to sort in descending order.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This comment explicitly asks the author to "confirm that this is the intended behavior" which directly violates the rule: "Do NOT ask the PR author to confirm their intention, to explain, to double-check things, to ensure the behavior is intended". The comment is speculative - it says "if the intent is to navigate to the most recent session, you may need to..." which is a conditional statement. The code comment clearly states the intention to take "the first one" after sorting ascending, so the implementation matches what's documented. There's no strong evidence that this is wrong - it's just the reviewer questioning whether a different behavior might be intended. The sorting logic might actually be incorrect if the feature is meant to open the "current running session" as mentioned in the comment. Taking the earliest session after a task's creation time might not be the right behavior if multiple child sessions exist. However, without more context about the business requirements, I cannot be certain. While there might be ambiguity about the correct behavior, the comment explicitly asks the author to "confirm" their intention, which is a clear violation of the rules. The code has an explicit comment explaining the logic, so the implementation appears intentional. Without strong evidence that this is wrong, and given that it's phrased as a request for confirmation rather than pointing out a definite bug, this comment should be deleted. This comment should be deleted because it asks the PR author to confirm their intention, which violates the review rules. The code has explicit comments documenting the sorting behavior, and there's no strong evidence that it's incorrect - just speculation about what might be intended.
2. humanlayer-wui/src/components/internal/SessionDetail/hooks/useSessionNavigation.ts:334
  • Draft comment:
    The filter and sort operations repeatedly call new Date(s.createdAt).getTime() for each session. Although this is likely not a performance issue with a small sessions list, for clarity and potential efficiency consider caching the timestamp for each session's createdAt if the sessions array grows large.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None

Workflow ID: wflow_cfhJzv8iME4FNutJ

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants