Skip to content

feat(#1241): Cmd+N opens a new panel at the pointer, follows the new view setting and equalizes its row - #1243

Merged
AGachet merged 2 commits into
developfrom
feature/1241-new-panel-at-pointer
Oct 28, 2026
Merged

AGachet merged 2 commits into
developfrom
feature/1241-new-panel-at-pointer

Conversation

@AGachet

@AGachet AGachet commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1241

Summary

⌘N, now labelled "New panel" / "Nouveau panneau" (FR-SHELL-086, changed for #1241; TC-SHELL-169):

  • At the pointer. A new panel opens beside the panel under the mouse pointer, on the side nearest it (left half: left, right half: right). Over no panel (sidebar, outside the window): right of the focused panel. One passive pointermove listener stores the coordinates; the panel is found with elementFromPoint only when ⌘N is pressed.
  • Equal widths. In the normal layout the new panel joins the row of the pointed panel and that row's columns get the same width (rowEqualizeOps, the equalize action's column-span weights). Stacked columns keep their heights; other rows are not touched.
  • What it opens. It uses the "When a new view opens" setting (New view chooser: favourite types left/right (Terminal, Web page…), the full list up/down, a setting to open one directly, and direct shortcuts #1232). The default opens the chooser with its favourites. A type can be set to open directly; Terminal opens the same terminal as before ⌘N changed (it inherits the folder and connection).
  • 360 view. Over a carpet panel, the new panel goes beside it on the carpet. Over the fixed zone, it goes at the start of the carpet. Carpet widths do not change.
  • The launcher's Terminal entry no longer shows ⌘N, because ⌘N no longer always opens a terminal.

Code: frontend/moltenterm-shell/newpanel/ (rules, pointer tracker, action), rowEqualizeOps in equalize/equalize-rules.ts, a MOLTENTERM-PATCH (#1241) in keymodel.ts with its row in UPSTREAM.md.

Behaviour change

To check first: ⌘N with the pointer over the right half of the left panel opens the chooser between the two panels, and all three columns get the same width. To get the old terminal back, set Settings › General › "When a new view opens" to Terminal.

  • With ⌘N already in a tab of 3+ columns, the screen's column threshold (360 view per screen: switch beyond N columns, keep the developer's proportions #1083) may switch the tab to 360 view. In 360 view the new panel lands on the carpet at the place described above, and widths are not equalized there.
  • Over a web page panel, the page swallows pointer moves. The panel is still found, but the side comes from where the pointer entered the page.

Tests

  • Unit tests (newpanel/new-panel-model.test.ts):
    • pointer in the left half, in the right half, and outside (focused panel used);
    • in the row: 2 columns become 3 at 1/3 each, a stacked column keeps its inner heights, and only the joined row changes;
    • 360 view: beside a carpet column, and at the carpet's start from the fixed zone;
    • the setting: chooser by default, Terminal directly, another type directly, Sessions runs.
  • Broke the side rule once, then the row scope once: each made its test fail.
  • The registry's duplicate-shortcut test still passes.
  • Ran task check:ts, npx vitest run (4163 passed), ESLint, Prettier and the ledger check.

Reviewed by AGachet · 2026-10-28

🤖 Generated with Claude Code

AGachet and others added 2 commits October 28, 2026 16:57
…view setting and equalizes its row

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… opens a new panel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AGachet AGachet changed the title [#1241] ⌘N opens a new panel at the pointer, follows the new view setting, and equalizes the row's widths feat(#1241): Cmd+N opens a new panel at the pointer, follows the new view setting and equalizes its row Oct 28, 2026
@AGachet
AGachet marked this pull request as ready for review October 28, 2026 16:03
@github-actions

Copy link
Copy Markdown

MoltenTerm performance report

Commit 0bec6d04 · profile ci · 2026-10-28T16:07:09.523Z · 55 s · linux/x64, AMD EPYC 9V45 96-Core Processor (4 cores), 16 GB · load average 5.49 3.24 1.28 · Electron 42.11.18 · memory: pss

Gate (ci scope): PASS · baseline 0215ba07 · 15 metrics measured

NFR-PERF-003

Metric Value Budget Baseline Δ Spread Gate Status
JS loaded up front by index.html (entry + modulepreloads) 9.24 MB 8 MB 9.83 MB -0.59 (-6 %) — ci over budget (as baseline)
JS evaluated by the starter tab view 9.76 MB 8 MB 30.78 MB -21.02 (-68.3 %) — ci over budget (as baseline)
Launches that did not reach wave-ready 0 0 0 0 (0 %) — ci ok
Launch to first tab ready, warm (median) 941 ms 1500 ms 2128.5 ms -1187.5 (-55.8 %) — local ok
Tab view init, warm (median) 293.5 ms 600 ms 1342 ms -1048.5 (-78.1 %) — local ok
Launch to first tab ready, fresh data (median) 6766 ms — 2299 ms +4467 (+194.3 %) — info regressed
Tab view init, fresh data (median) 1294 ms — 1531 ms -237 (-15.5 %) — info ok

NFR-PERF-004

Metric Value Budget Baseline Δ Spread Gate Status
Create workspace to new tab on screen (p95) 137 ms 150 ms 176.6 ms -39.6 (-22.4 %) 2.2 % local ok
Delete a workspace (p95) 49 ms 150 ms 70.8 ms -21.8 (-30.8 %) 1 % local ok
Workspace operations that never reached the screen (30 s) 0 0 0 0 (0 %) — local ok

NFR-PERF-006

Metric Value Budget Baseline Δ Spread Gate Status
Tab views left after deleting 4 workspaces 0 0 4 -4 (-100 %) — ci ok
Tab views left after 5 create/delete loops 0 0 5 -5 (-100 %) — local ok

NFR-PERF-007

Metric Value Budget Baseline Δ Spread Gate Status
Renderer bundle JavaScript, raw 54.32 MB — 53.99 MB +0.33 (+0.6 %) — ci ok
Renderer bundle JavaScript, gzip 10.33 MB — 10.25 MB +0.08 (+0.8 %) — info ok
Renderer bundle CSS, raw 0.76 MB — 0.71 MB +0.05 (+7 %) — info ok
Details

Start-up runs (ms from launch)

Run wavesrv ready Init Bare wave-ready 1st tab view init JS evaluated
cold 5049 6624 6766 1294 9.76 MB
warm 221 801 941 289 9.76 MB
warm 207 790 941 298 9.76 MB

Workspace operations (ms)

Operation Samples
create 104, 113, 137, 137, 99, 97, 93, 94, 93
switchNew —
switchVisited —
delete 34, 31, 36, 35, 24, 49, 24, 23, 49

Leaks

{
 "afterDeletes": {
  "deleted": 4,
  "tabViews": 2,
  "spares": 1,
  "unresponsive": 0,
  "leaked": 0,
  "webviews": 1
 },
 "gatedLoops": {
  "loops": 5,
  "tabViews": 2,
  "spares": 1,
  "unresponsive": 0,
  "leaked": 0,
  "webviews": 1
 },
 "loops": {
  "loops": 5,
  "tabViews": 2,
  "spares": 1,
  "unresponsive": 0,
  "leaked": 0,
  "webviews": 1,
  "memBeforeMB": 788,
  "memAfterMB": 787.6
 }
}

Bundle

Up front: assets/index-BfdbqiQW.js 9.24 MB.
Largest: assets/ts.worker-C7hW3aY-.js 13.26 MB, assets/index-BfdbqiQW.js 9.24 MB, assets/monaco-react-BdsaBc1y.js 7.35 MB, assets/css.worker-umuuUiIb.js 1.87 MB, assets/yamlworker-VevFtHSr.js 1.44 MB, assets/cynefin-OW5HDTMX-DN-hgDnz.js 1.3 MB, assets/html.worker-BT47iy49.js 1.24 MB, assets/mermaid.core-DlF_3gez.js 1.06 MB, assets/cytoscape.esm-DlPuZvnJ.js 0.96 MB, assets/json.worker-D4JVmXIe.js 0.84 MB.

@AGachet
AGachet merged commit 8f17e4a into develop Oct 28, 2026
12 of 14 checks passed
@AGachet
AGachet deleted the feature/1241-new-panel-at-pointer branch October 28, 2026 16:11
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.

1 participant