Repository navigation
Conversation
A saved session's title in the sidebar is now a real link (?session=<id>), so middle-click and Ctrl/Cmd-click open it in a new browser tab while the current tab keeps its session. A plain click and Enter still select it in place without a page load. The row's own click handler is unchanged. The row menu (right-click and ⋯) gets "Open in new tab" (T), just before Delete; never first, since a menu's first item takes focus when it opens. Transient sessions keep their button and get no link. When focus is put back into a row it now goes to its first a[href] or button, so a keyboard Fork focuses the copy's link, not its archive button. Closes agegr#1167
wowayou
force-pushed
the
feat/session-open-new-tab
branch
from
October 10, 2026 15:58
e7c0455 to
dd5bd92
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
?session=<id>),so middle-click, Ctrl/Cmd-click and other native link gestures open it in a
new browser tab without changing the current tab's session.
⋯) has Open in new tab (shortcut T),after the session-management actions and just before Delete. It is available
for normal, pinned, archived and running sessions.
Implementation
lib/session-links.tsbuilds a relative?session=<encoded-id>link. Itpreserves the current origin and path for sub-path deployments and removes
stale query parameters and the hash.
isPlainActivation()keeps ordinarylink activation in the current page.
SessionTreeretains the latest upstream sidebar layout and row markup. Onlythe main control of a saved session becomes an
<a href>; archive and⋯controls remain outside the link. Plain activation is handled in place;
modifier and auxiliary clicks use the browser's native behavior. The row's
own click handler remains unchanged, so transient rows and row whitespace
preserve their previous behavior.
a[href], button, so a revealed orforked saved session focuses its link instead of its archive button.
SessionSidebaradds the synchronouswindow.open(..., "_blank", "noopener,noreferrer")menu action for the clicked row. It does not select,move cwd, create, fork or prompt a session. The downstream
pi-web:session-row-contextmenuhook remains unchanged.OpenInNewTabIconand translations for en, zh-CN and zh-TW are included.mainat30af3b4(v0.11.1), includingthe newer files-below-sessions layout, archive motion, row sizing and drag
behavior. No backend, Agent lifecycle, session format, dependency or Demo
changes were introduced.
Testing
node_modules/.bin/tsc --noEmit: PASSnpm run lint: PASSnpm test: PASS, 2935 tests; 2934 passed, 0 failed, 1 skippednpm run test:e2e: PASS, 27 checks. The first migration run hit the knownupstream reading-offset timing assertion; the next run passed completely.
modifier behavior, middle-click, right-click and
⋯menus, reload andper-tab memory, pinned and archived rows, no session creation/fork/prompt,
missing-session behavior in a fresh profile, and focus after keyboard Fork.
commits (
dd5bd92,b1b5e13).git diff origin/main..HEADcontains thefeature files only;
git diff --checkis clean.Compatibility
sidebar layout.
tested.
PR.
Known limitation (tracked separately)
A link to a session that no longer exists falls back to that project's last
open session when the browser profile has previously opened a session in that
project. This behavior is reproduced in the final feature branch and is
tracked in #1168. A fresh browser profile selects no session.
Upstream synchronization
This branch was rebased after upstream merged the sidebar layout and release
commits that landed during development. The fork's
mainis now identical toagegr/pi-web:main, and the PR no longer has merge conflicts.Closes #1167