Compare commits

...

2 Commits

Author SHA1 Message Date
a469e8b886 chore(release): v0.7.16
All checks were successful
ci / mutation test (broker) (push) Has been skipped
ci / test-health gate (push) Successful in 18s
Release Publish (Gitea session_helper) / verify-release-tag (push) Successful in 17s
ci / rust release (push) Successful in 2m17s
ci / rust debug (push) Successful in 2m55s
Release Publish (Gitea session_helper) / publish-linux-x86_64 (push) Successful in 3m44s
ci / python (push) Successful in 1m30s
Bump pyproject.toml, rust workspace, uv.lock, Cargo.lock from
0.7.15 to 0.7.16. Release contents:

- fix: connect-progress output panel now re-shows itself after every
  trace event so it reappears once the SSH askpass / OTP input
  panel closes. Pre-fix the user saw an empty bottom strip while
  the helper push + session spawn were silently running for 30-60 s.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 15:12:35 +09:00
23c34fa7d6 fix(sublime): re-show connect progress panel after every trace event
The connect-progress output panel only called ``show_panel`` on the
*first* append, on the assumption that subsequent appends would
land in the same panel. That breaks when Sublime's input panel
takes over the bottom-panel area for an SSH askpass / OTP prompt:
once the user submits the code and the input panel closes,
Sublime doesn't auto-restore the previously-shown output panel.
The user then sees an empty bottom strip while the next bridge
phase (helper-push, session-spawn, persistent handshake) silently
does work for 30-60 s.

Fix: ``_append_line`` now calls ``show_panel`` on every event.
``show_panel`` is idempotent so this is cheap. The
``_PROGRESS_PANEL_NAME`` panel was created lazily at first paint
already — that part stays, only the ``show_panel`` call moved out
of the ``first_paint`` branch.

Regression test
``test_progress_panel_re_shows_panel_on_every_event`` asserts
``show_panel`` fires at least twice across two trace events
(pre-fix it fired exactly once). Full sublime suite 1222 pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 15:11:52 +09:00
6 changed files with 57 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
[project]
name = "sessions-sublime"
version = "0.7.15"
version = "0.7.16"
description = "Sublime-facing Python code for Sessions."
requires-python = ">=3.8"
license = {text = "MIT"}

12
rust/Cargo.lock generated
View File

@@ -221,7 +221,7 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
[[package]]
name = "local_bridge"
version = "0.7.15"
version = "0.7.16"
dependencies = [
"base64",
"glob",
@@ -432,7 +432,7 @@ dependencies = [
[[package]]
name = "session_helper"
version = "0.7.15"
version = "0.7.16"
dependencies = [
"base64",
"notify",
@@ -443,7 +443,7 @@ dependencies = [
[[package]]
name = "session_protocol"
version = "0.7.15"
version = "0.7.16"
dependencies = [
"base64",
"serde",
@@ -452,14 +452,14 @@ dependencies = [
[[package]]
name = "sessions_askpass"
version = "0.7.15"
version = "0.7.16"
dependencies = [
"tempfile",
]
[[package]]
name = "sessions_native"
version = "0.7.15"
version = "0.7.16"
dependencies = [
"serde_json",
"session_protocol",
@@ -770,7 +770,7 @@ dependencies = [
[[package]]
name = "workspace_identity"
version = "0.7.15"
version = "0.7.16"
[[package]]
name = "zmij"

View File

@@ -12,7 +12,7 @@ resolver = "2"
[workspace.package]
edition = "2024"
license = "MIT"
version = "0.7.15"
version = "0.7.16"
authors = ["Myeongseon Choi <key262yek@gmail.com>"]
repository = "https://git.teahaven.kr/sublime-rs/sessions"
homepage = "https://git.teahaven.kr/sublime-rs/sessions"

View File

@@ -239,11 +239,18 @@ class ConnectProgressPanel:
self._append_line(text)
def _append_line(self, text: str) -> None:
"""On-main-thread append; creates + shows the panel on first call.
"""On-main-thread append; creates + shows the panel on every call.
Creating the panel lazily here (instead of in ``start``) guarantees
``create_output_panel`` + ``show_panel`` execute on the main thread
even when ``start`` was invoked from a background queue worker.
``show_panel`` runs on *every* append (not just first-paint) so the
progress pane reappears after Sublime's input panel takes over the
bottom area for an SSH askpass / OTP prompt — otherwise the user
sees an empty bottom strip while the next bridge phase
(helper-push, session-spawn, …) is silently doing work for tens
of seconds. ``show_panel`` is idempotent.
"""
find = getattr(self._window, "find_output_panel", None)
panel = find(_PROGRESS_PANEL_NAME) if callable(find) else None
@@ -257,12 +264,12 @@ class ConnectProgressPanel:
if callable(rc):
rc("select_all", {})
rc("left_delete", {})
win_rc = getattr(self._window, "run_command", None)
if callable(win_rc):
win_rc(
"show_panel",
{"panel": "output.{}".format(_PROGRESS_PANEL_NAME)},
)
win_rc = getattr(self._window, "run_command", None)
if callable(win_rc):
win_rc(
"show_panel",
{"panel": "output.{}".format(_PROGRESS_PANEL_NAME)},
)
rc = getattr(panel, "run_command", None)
if not callable(rc):
return

View File

@@ -67,6 +67,40 @@ def test_progress_panel_subscribes_and_formats_events() -> None:
assert "Spawning bridge session" in joined
def test_progress_panel_re_shows_panel_on_every_event() -> None:
"""Every trace event re-issues ``show_panel``: the askpass / OTP prompt
takes over Sublime's bottom-panel area, so without an explicit re-show
the user stares at an empty strip while the next bridge phase
(helper-push, session-spawn, …) silently does work for tens of seconds."""
window = FakeWindow()
panel = connect_progress.ConnectProgressPanel(window, "aws-celery")
panel.start()
try:
# First event — creates the panel + shows it.
ssh_file_transport._transport_trace_event(
"connect.begin", host_alias="aws-celery", remote_root="/srv/app"
)
# Subsequent event after the askpass dialog would have hidden us.
ssh_file_transport._transport_trace_event(
"bridge.session_spawn", host_alias="aws-celery"
)
finally:
panel.stop()
show_panel_calls = [
args
for name, args in window.window_commands
if name == "show_panel"
and args.get("panel")
== "output.{}".format(connect_progress._PROGRESS_PANEL_NAME)
]
# Pre-fix this list had a single entry (first paint only); after the
# fix we expect at least two — one per event.
assert len(show_panel_calls) >= 2, (
"show_panel must fire on each event, got {}".format(len(show_panel_calls))
)
def test_progress_panel_stop_unregisters_listener() -> None:
"""After stop(), further trace events must not append to the panel."""
window = FakeWindow()

2
uv.lock generated
View File

@@ -854,7 +854,7 @@ wheels = [
[[package]]
name = "sessions-sublime"
version = "0.7.15"
version = "0.7.16"
source = { virtual = "." }
[package.dev-dependencies]