Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
92edd8e
feat(terminal): restore bounded recent command output per pane
galact-byte Sep 21, 2026
d3f3962
merge: integrate upstream main for recent output restore
galact-byte Sep 21, 2026
aa93047
docs(recent-output): fix decision note validation and refresh evidence
galact-byte Sep 21, 2026
ec9fba4
fix(terminal): confirm recent output submissions on all platforms
galact-byte Sep 21, 2026
19e72aa
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 21, 2026
997e05f
fix(cli): sync Windows completions on output restore branch
galact-byte Sep 21, 2026
ae3a43d
Merge upstream main into PR #235 and resolve conflicts
galact-byte Sep 21, 2026
ad812bb
test: fix Unix fixture collision and macOS path selection
galact-byte Sep 21, 2026
2cd35c2
Merge upstream main into PR #235, retain recent output restore
galact-byte Sep 23, 2026
49a6942
test: initialize output refs in workspace recovery fixture
galact-byte Sep 23, 2026
761dfac
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 23, 2026
e6c2260
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 23, 2026
1e23fe0
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 24, 2026
5cfdfec
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 24, 2026
0d07b1f
feat: narrow recent output restore to snapshot and storage foundation
galact-byte Sep 26, 2026
5917c5f
ci: rerun checks for recent output foundation
galact-byte Sep 26, 2026
c454ae9
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 27, 2026
086ac80
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 28, 2026
2f9ae61
fix: bound snapshot decoding and sanitize orphan wide-char flags
galact-byte Sep 28, 2026
a02ca89
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 28, 2026
9d788bc
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 28, 2026
27d37d2
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 29, 2026
f57d6be
Merge branch 'main' into feat/recent-output-restore
galact-byte Sep 30, 2026
4e39bd3
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 1, 2026
2b42430
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 1, 2026
8f25ca1
ci: retrigger checks after windows-11-arm runner lost communication
galact-byte Oct 1, 2026
4e2563e
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 2, 2026
8c248ca
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 3, 2026
03634d4
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 5, 2026
ed4a048
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 8, 2026
fdcb768
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 11, 2026
83de83a
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 15, 2026
12151b8
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 18, 2026
00eec87
ci: retry native checks after upstream animation test failure
galact-byte Oct 18, 2026
eb59724
Merge branch 'main' into feat/recent-output-restore
galact-byte Oct 30, 2026
a2b93a5
feat(cli): allow explicit independent GPUI instances
Aschenbath Oct 31, 2026
a98da24
Integrate independent instance launches with current workspace startup
Kuddev Nov 19, 2026
f1b5420
Move recent output and its snapshot tests to the current Pebrel crates
Kuddev Nov 19, 2026
6ef9949
Integrate the reviewed terminal snapshot prerequisite for output storage
Kuddev Nov 19, 2026
c2548eb
Bound pane and record decoding in local output archives
Kuddev Nov 19, 2026
52e80a2
Merge branch 'main' into feat/new-instance-348
Kuddev Nov 19, 2026
f537dd7
Register file-configured shortcut aliases with their native key names
Kuddev Nov 19, 2026
75c5d24
Update the Nix package and vendor hash for current Pebrel targets
Kuddev Nov 19, 2026
2931323
Preserve the reviewed Nix contribution at its verified revision
Kuddev Nov 19, 2026
033da37
Integrate bounded recent output storage from PR 235
Kuddev Nov 19, 2026
55b14dd
Integrate independent startup with bounded output storage
Kuddev Nov 19, 2026
f939fdd
Include canonical shortcut aliases in the integration batch
Kuddev Nov 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Explicit independent GUI launches

## Status

Proposed in the implementation PR for issue #348.

## Context

Ordinary launches hand their directory and shell to the resident process. Issue
#348 requests a way to start another process. Skipping only the initial handover
is insufficient: GPUI also hands over after losing the runtime ownership lock.
Continuing without a runtime server would leave that process's panes without
their own control endpoint, while session checkpoints could overwrite the
resident's saved workspace.

## Evidence

[`main::try_hand_over_to_resident`](../../../../../pebrel_app/src/main.rs) and
[`gpui_shell::run_shell`](../../../../../pebrel_app/src/gpui_shell/mod.rs) implement
the two handover paths.
[`RuntimeServer::spawn_at`](../../../../../pebrel_app/src/runtime_api/server.rs)
already supports an unpublished endpoint and exports it to terminal children.
[`SessionPersistence`](../../../../../pebrel_app/src/gpui_shell/workspace/session_persistence.rs)
already supports in-memory snapshots for isolated windows. Both facilities previously selected
that scope only through the elevation policy.

## Decision

Record the explicit `--new-instance` intent once after CLI parsing. Startup
ownership uses one predicate combining that intent with the existing elevation
requirement. The explicit option is limited to GPUI launches.

The process starts a fresh terminal, owns an unpublished runtime endpoint, and
keeps automatic workspace snapshots in memory. Its children receive that
endpoint even when the process was launched from another Pebrel terminal.
Closing its last window exits instead of hiding an undiscoverable resident.
Ordinary launches retain their current handover, discovery, and session policy.

The explicit launch also bypasses elevated handover and automatic restoration
or installation of a previously scheduled update. Saved mobile connections are
not automatically resumed by the extra instance. Settings and other user data
remain shared; this option is not a separate configuration profile.

## Rejected alternatives

- Skip handover but keep shared discovery: the resident lock still prevents a
runtime server, and clients can target the wrong process.
- Overwrite `runtime.port`: redirects existing clients and competes with the
resident's cleanup.
- Export an inherited environment flag: every nested invocation would silently
acquire the same launch policy instead of requiring explicit intent.
- Create a temporary settings tree: changes configuration and persistence
semantics beyond the requested process separation.

## Consequences

Independent windows do not participate in ordinary session restoration. Users
can still explicitly export a workspace. No dependencies, protocol fields, or
new persisted settings are introduced. The startup flag is immutable for the
process lifetime and does not alter privilege detection.

## Validation

[CLI regression coverage](../../../../../pebrel_app/src/cli.rs) checks terminal
launch arguments. The [independent-instance tests](../../../../../pebrel_app/src/gpui_shell/workspace/windowing/new_instance_tests.rs)
check incompatible launch modes. A subprocess test uses the real startup
predicate and runtime constructor while the resident discovery lock is held,
verifies the child endpoint with a PING, and checks shared discovery and session
bytes after checkpoints, close, quit, and server drop. This is process and socket evidence, not native desktop
visual acceptance.

## Supersedes

None.

## Revisit when

Independent instances need persistent profiles or per-instance update recovery;
those need explicit storage ownership rather than shared-file overwrites.
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 静态输出快照与本机引用的持久化边界

## Status

供审核的持久化基础;尚未接入命令采集、设置控件或窗口输出恢复。
关联 #160,本阶段不代表完整功能已交付。

## Context

终端显示、输出文件和布局会话的生命周期不同。多个 pane 可以处于同一目录,
因此目录不能作为旧输出归属。直接回放原始 VT 会再次执行控制动作;
把输出及引用放进共享工作区格式,又会让导出携带本机历史。

## Evidence

- [显示快照与校验](../../../../pebrel_terminal/src/grid/snapshot.rs)覆盖 Unicode 重排、容量和控制数据拒绝;备用屏活动时读取主屏由第二项随采集接入。
- [有界输出存储](../../../../pebrel_app/src/recent_output/storage.rs)复用原子文件写入。
- [发布生命周期](../../../../pebrel_app/src/recent_output/storage/lifecycle.rs)的回归测试覆盖两代交接、失败重试和发布回调内失效。
- 本机会话引用(`session/local_output.rs`)随第二项的逐 pane 采集交付;本项存储测试以普通文件代替会话,只验证发布回调的提交语义。

## Decision

terminal 层仅捕获和恢复主屏的静态显示字段,恢复到历史区,不重放 VT,
不改活终端屏幕或光标。反序列化与恢复先校验结构、容量和控制数据。

app 层以独立 sidecar 保存有界记录,每 pane 最多五条,每条最多 256 KiB。
正常归档最多 16 MiB,两代原子交接最多 32 MiB;超量先裁剪旧记录再生成引用。
读取 sidecar 时,解码器逐项检查 pane 引用、每个 pane 的记录数和每条记录的编码大小。它只接收一代交接数据;重复引用会使归档无效。
精确引用只属于本机自动恢复文档,共享工作区的导入和导出不携带这些引用。

先持久化输出,再发布会话引用,发布成功前保留旧引用可读取的那一代。
发布失败恢复旧归档;成功后才能回收旧代。回调成功意味着会话已经落盘,
即使回调内代次失效,也必须报告真实的持久化结果并保留交接数据。
后续接入者负责通过同一串行边界提交新的 checkpoint;无引用 checkpoint
不能等同清除全部旧历史,显式清除使用独立操作。

## Rejected alternatives

- 回放原始 VT:会重放控制动作,无法保证只恢复显示。
- 按 cwd 匹配:同目录多 pane 无法确定归属。
- 在共享会话中嵌入输出或本机引用:扩大导出范围和载入成本。
- 发布引用前覆盖旧代:中断后旧会话可能引用已丢失的数据。
- 发布成功后仅凭代次变化返回未提交:内存结果会与实际磁盘状态矛盾。

## Consequences

存储和终端边界可各自验证,后续采集及窗口接入复用同一规则。
本阶段不会自动记录命令或恢复终端输出,也不新增用户设置。
调用方须在后台执行磁盘操作,并承担持久化完成后的生命周期收尾。

## Validation

Windows 上实际运行:存储 24 项、会话相关 105 项、启动恢复 1 项通过;
`cargo test --locked -p nebula_terminal --features serde` 的 352 项通过,
包含使用现有打包资产执行的 ConPTY 生命周期测试。
应用测试启用 `gpui-test-support`;仅关闭应用测试目标的调试符号,断言不变。
这些结果验证本阶段边界,不作为尚未接入的窗口输出恢复验收。

## Supersedes

None。

## Revisit when

需要改变容量、引用身份、原子交接协议,或允许跨设备导出输出时重新审核。
10 changes: 10 additions & 0 deletions docs/runtime-control-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ CLI 路径由环境给出,调用方无需根据展示名称猜测文件名。

## CLI

### 独立进程

`pebrel --new-instance` 在新的 GPUI 进程中打开一个全新终端。它支持通常的
`--working-directory`、`--shell` 和 `-e` 参数,不交给已经运行的实例。
配置仍然共享;该进程不恢复或自动保存普通工作区,关闭最后一个窗口时退出。

独立进程不替换共享的 `runtime.port`。它的本地终端通过继承的
`PEBREL_RUNTIME_ENDPOINT` 访问自己的控制面,因此应在对应终端中运行
`pebrel pane list` 等命令。已有实例及其终端继续使用自己的控制面。

### 资源 + 动词

面向"模型在 pane 里临时要派个活儿"这一种用法。命名用 CLI 界的通用惯例(资源在前、动词在后,
Expand Down
1 change: 1 addition & 0 deletions extra/completions/_pebrel
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ _pebrel() {
'(--daemon)--ref-test[Generates ref test]' \
'--gpui[Launch the GPUI UI shell as the main window]' \
'--launched-at-login[Identify a launch from the per-user login item]' \
'(--daemon --ref-test --launched-at-login)--new-instance[Start a separate GPUI process with a fresh, unsaved workspace]' \
'(-v)*-q[Reduces the level of verbosity (the min level is -qq)]' \
'(-q)*-v[Increases the level of verbosity (the max level is -vvv)]' \
'--daemon[Do not spawn an initial window]' \
Expand Down
2 changes: 1 addition & 1 deletion extra/completions/pebrel.bash
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ _pebrel() {

case "${cmd}" in
pebrel)
opts="-q -v -e -T -o -h -V --print-events --ref-test --embed --gpui --launched-at-login --config-file --socket --daemon --working-directory --shell --hold --command --title --class --option --help --version [DIRECTORY] predict view ctl env window tab pane agent migrate config plugin theme setup-ai help"
opts="-q -v -e -T -o -h -V --print-events --ref-test --embed --gpui --launched-at-login --new-instance --config-file --socket --daemon --working-directory --shell --hold --command --title --class --option --help --version [DIRECTORY] predict view ctl env window tab pane agent migrate config plugin theme setup-ai help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand Down
3 changes: 2 additions & 1 deletion extra/completions/pebrel.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.
function __fish_pebrel_global_optspecs
string join \n print-events ref-test embed= gpui launched-at-login config-file= socket= q v daemon working-directory= shell= hold e/command= T/title= class= o/option= h/help V/version
string join \n print-events ref-test embed= gpui launched-at-login new-instance config-file= socket= q v daemon working-directory= shell= hold e/command= T/title= class= o/option= h/help V/version
end

function __fish_pebrel_needs_command
Expand Down Expand Up @@ -37,6 +37,7 @@ complete -c pebrel -n "__fish_pebrel_needs_command" -l print-events -d 'Print al
complete -c pebrel -n "__fish_pebrel_needs_command" -l ref-test -d 'Generates ref test'
complete -c pebrel -n "__fish_pebrel_needs_command" -l gpui -d 'Launch the GPUI UI shell as the main window'
complete -c pebrel -n "__fish_pebrel_needs_command" -l launched-at-login -d 'Identify a launch from the per-user login item'
complete -c pebrel -n "__fish_pebrel_needs_command" -l new-instance -d 'Start a separate GPUI process with a fresh, unsaved workspace'
complete -c pebrel -n "__fish_pebrel_needs_command" -s q -d 'Reduces the level of verbosity (the min level is -qq)'
complete -c pebrel -n "__fish_pebrel_needs_command" -s v -d 'Increases the level of verbosity (the max level is -vvv)'
complete -c pebrel -n "__fish_pebrel_needs_command" -l daemon -d 'Do not spawn an initial window'
Expand Down
1 change: 1 addition & 0 deletions extra/completions/windows/_pebrel
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ _pebrel() {
'(--daemon)--ref-test[Generates ref test]' \
'--gpui[Launch the GPUI UI shell as the main window]' \
'--launched-at-login[Identify a launch from the per-user login item]' \
'(--daemon --ref-test --launched-at-login)--new-instance[Start a separate GPUI process with a fresh, unsaved workspace]' \
'(-v)*-q[Reduces the level of verbosity (the min level is -qq)]' \
'(-q)*-v[Increases the level of verbosity (the max level is -vvv)]' \
'--daemon[Do not spawn an initial window]' \
Expand Down
2 changes: 1 addition & 1 deletion extra/completions/windows/pebrel.bash
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ _pebrel() {

case "${cmd}" in
pebrel)
opts="-q -v -e -T -o -h -V --print-events --ref-test --embed --gpui --launched-at-login --config-file --daemon --working-directory --shell --hold --command --title --class --option --help --version [DIRECTORY] predict view ctl env window tab pane agent migrate config plugin theme notify-test setup-ai ssh help"
opts="-q -v -e -T -o -h -V --print-events --ref-test --embed --gpui --launched-at-login --new-instance --config-file --daemon --working-directory --shell --hold --command --title --class --option --help --version [DIRECTORY] predict view ctl env window tab pane agent migrate config plugin theme notify-test setup-ai ssh help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand Down
3 changes: 2 additions & 1 deletion extra/completions/windows/pebrel.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.
function __fish_pebrel_global_optspecs
string join \n print-events ref-test embed= gpui launched-at-login config-file= q v daemon working-directory= shell= hold e/command= T/title= class= o/option= h/help V/version
string join \n print-events ref-test embed= gpui launched-at-login new-instance config-file= q v daemon working-directory= shell= hold e/command= T/title= class= o/option= h/help V/version
end

function __fish_pebrel_needs_command
Expand Down Expand Up @@ -36,6 +36,7 @@ complete -c pebrel -n "__fish_pebrel_needs_command" -l print-events -d 'Print al
complete -c pebrel -n "__fish_pebrel_needs_command" -l ref-test -d 'Generates ref test'
complete -c pebrel -n "__fish_pebrel_needs_command" -l gpui -d 'Launch the GPUI UI shell as the main window'
complete -c pebrel -n "__fish_pebrel_needs_command" -l launched-at-login -d 'Identify a launch from the per-user login item'
complete -c pebrel -n "__fish_pebrel_needs_command" -l new-instance -d 'Start a separate GPUI process with a fresh, unsaved workspace'
complete -c pebrel -n "__fish_pebrel_needs_command" -s q -d 'Reduces the level of verbosity (the min level is -qq)'
complete -c pebrel -n "__fish_pebrel_needs_command" -s v -d 'Increases the level of verbosity (the max level is -vvv)'
complete -c pebrel -n "__fish_pebrel_needs_command" -l daemon -d 'Do not spawn an initial window'
Expand Down
3 changes: 3 additions & 0 deletions pebrel_app/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@
- Windows Acrylic 的动画期间透明回退与计时边界见 [`窗口状态切换`](../architecture/notes/pebrel_app/platform/2026-09-22-acrylic-window-transitions.md)。
- 登录项的启动意图与首窗静默边界见 [`登录启动`](../architecture/notes/pebrel_app/platform/startup/2026-10-10-login-launch-intent.md)。
- OSC 8 本地链接的 C1 损坏恢复、显式链接身份与后台匹配边界见 [`file_uri`](../architecture/notes/pebrel_app/file_uri/2026-11-11-c1-corrupted-osc8-file-links.md)。

- 本机命令输出归档的代次、容量与发布顺序见 [最近输出的持久化边界](../architecture/notes/pebrel_app/recent_output/2026-09-21-bounded-local-output.md)。
- 登录项的启动意图、首窗静默与显式独立实例的运行时和会话归属见 [`启动边界`](../architecture/notes/pebrel_app/platform/startup/)。
25 changes: 25 additions & 0 deletions pebrel_app/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ pub struct Options {
#[clap(long = "launched-at-login", hide = true)]
pub launched_at_login: bool,

/// Start a separate GPUI process with a fresh, unsaved workspace.
///
/// Shares settings; leaves the resident instance and saved session untouched.
#[cfg(feature = "gpui-shell")]
#[clap(long, conflicts_with_all = ["daemon", "ref_test", "launched_at_login"])]
#[cfg_attr(feature = "legacy-shell", clap(conflicts_with = "legacy_shell"))]
pub new_instance: bool,

/// Launch the legacy winit shell instead of GPUI.
#[cfg(all(feature = "gpui-shell", feature = "legacy-shell"))]
#[clap(long = "legacy-shell")]
Expand Down Expand Up @@ -1448,6 +1456,23 @@ mod tests {
assert!(terminal.command.is_empty());
}

#[cfg(feature = "gpui-shell")]
#[test]
fn new_instance_accepts_explicit_terminal_options() {
let options = Options::try_parse_from([
"pebrel",
"--new-instance",
"--working-directory",
".",
"-e",
"sh",
"-l",
])
.expect("a separate GUI process accepts the usual terminal launch options");
assert!(options.new_instance);
assert_eq!(options.window_options.terminal_options.command, ["sh", "-l"]);
}

#[test]
fn dynamic_title_ignoring_options_by_default() {
let mut config = UiConfig::default();
Expand Down
18 changes: 10 additions & 8 deletions pebrel_app/src/gpui_shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ use gpui::{App, AppContext as _};

use std::borrow::Cow;

use crate::platform::startup::instance;

/// GPUI 主窗没有可靠的标准错误句柄;保留父进程重定向诊断,但写失败不能
/// 再把非致命错误升级成应用 panic。
pub(crate) fn try_write_stderr(args: std::fmt::Arguments<'_>) {
Expand Down Expand Up @@ -109,7 +111,9 @@ pub fn run_shell(
// reads its first RuntimeSettings snapshot.
let startup_window = config::source::initialize(config_file.clone());
let (shell_tx, shell_rx) = std::sync::mpsc::channel();
let _elevated_handover = if crate::platform::elevation::is_elevated().is_ok_and(|value| value) {
let _elevated_handover = if !instance::explicitly_requested()
&& crate::platform::elevation::is_elevated().is_ok_and(|value| value)
{
use crate::platform::elevation::handover::{Request, Startup, start_or_forward};
let settings = pebrel_settings::RuntimeSettings::load();
let request = Request {
Expand Down Expand Up @@ -147,7 +151,8 @@ pub fn run_shell(
None
};
// 管理员重复启动先交给已有拥有者;不能提前消耗“下次启动安装”的预约。
if crate::platform::CAPABILITIES.self_update_install
if !instance::explicitly_requested()
&& crate::platform::CAPABILITIES.self_update_install
&& crate::update_download::handoff::apply_scheduled()
{
return;
Expand Down Expand Up @@ -195,10 +200,7 @@ pub fn run_shell(
},
runtime_hub.clone(),
);
if runtime_server.is_none()
&& initial_command.is_none()
&& !crate::platform::elevation::requires_isolation()
{
if runtime_server.is_none() && initial_command.is_none() && !instance::is_private() {
// 与另一份进程同时启动时,对方可能已经拿到 owner lock、但尚未来得及
// 发布 endpoint。短暂等待并交接,避免继续打开一个无控制面的空窗口。
let settings = pebrel_settings::RuntimeSettings::load();
Expand Down Expand Up @@ -232,7 +234,7 @@ pub fn run_shell(
std::thread::sleep(std::time::Duration::from_millis(25));
}
}
if runtime_server.is_some() {
if runtime_server.is_some() && !instance::explicitly_requested() {
crate::mobile_connection::resume_saved();
}
let _runtime_server = runtime_server;
Expand All @@ -254,7 +256,7 @@ pub fn run_shell(
if initial_cwd.is_some()
|| initial_command.is_some()
|| shell_id.is_some()
|| crate::platform::elevation::requires_isolation()
|| instance::is_private()
|| !crate::platform::startup::start_hidden(
&pebrel_settings::RuntimeSettings::load(),
launched_at_login,
Expand Down
6 changes: 4 additions & 2 deletions pebrel_app/src/gpui_shell/workspace/keyboard_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,11 @@ impl NebulaWorkspace {
let mut current_bindings = Vec::new();
for (combo, action) in raw {
let Some(action) = crate::display::keymap::parse_action(&action) else { continue };
if crate::display::keymap::parse_combo(&combo).is_none() {
let Some(combo) = crate::display::keymap::parse_combo(&combo)
.and_then(|(mods, key)| crate::display::keymap::canonical_combo(mods, &key))
else {
continue;
}
};
// Terminal strings have one scoped binding; workspace actions also
// need the root binding so they can override less-specific defaults.
for scope in [None, Some(crate::gpui_shell::terminal::KEY_CONTEXT)] {
Expand Down
Loading
Loading