René's URL Explorer Experiment


Title: id(ssh): PR #594 never enters the alternate screen during a session — its leave path sends the ENTER sequence and ALT_SCREEN_LEAVE is never used · Issue #601 · developing-today/code · GitHub

Open Graph Title: id(ssh): PR #594 never enters the alternate screen during a session — its leave path sends the ENTER sequence and ALT_SCREEN_LEAVE is never used · Issue #601 · developing-today/code

X Title: id(ssh): PR #594 never enters the alternate screen during a session — its leave path sends the ENTER sequence and ALT_SCREEN_LEAVE is never used · Issue #601 · developing-today/code

Description: Contribute to developing-today/code development by creating an account on GitHub.

Open Graph Description: Contribute to developing-today/code development by creating an account on GitHub.

X Description: Contribute to developing-today/code development by creating an account on GitHub.

Opengraph URL: https://github.com/developing-today/code

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(ssh): PR #594 never enters the alternate screen during a session — its leave path sends the ENTER sequence and ALT_SCREEN_LEAVE is never used","articleBody":"## Finding\n\nPR #594 (OPEN, head `090c356b52a9e1c852692785cee2d0af3e03eef1`) claims to enter the alternate screen on raw SSH shell start and leave it on every exit path (#545), but the enter sequence is never written to the channel while a session runs, and the leave path sends the **enter** sequence again. #545 is not actually fixed by the PR as written.\n\n## Evidence (`pkgs/id/src/world_ssh.rs` on the PR head)\n\n- `:48-50` defines both sequences:\n  - `ALT_SCREEN_ENTER = \"\\x1b[?1049h\"`\n  - `ALT_SCREEN_LEAVE = \"\\x1b[?1049l\"`\n- `:318-320` stores the **enter** string in the session state: `let alt_screen = if !login.command_mode { Some(ALT_SCREEN_ENTER.to_owned()) } else { None };`\n- The only place that stored string is ever written to the channel is `leave_alt_screen()` at `:464-475`, after `run_session` ends:\n\n  ```rust\n  let Some(sequence) = self.alt_screen.take() else { return; };\n  let text = match self.last_error.take() {\n      Some(error) => format!(\"{sequence}\\r\\n{error}\\r\\n\"),\n      None => sequence,\n  };\n  let _ = self.handle.data(self.channel, text).await;\n  ```\n\n  So at exit the terminal receives `\\x1b[?1049h` (enter) — the opposite of leaving — immediately before the channel closes.\n- `ALT_SCREEN_LEAVE` has no other reference in the file (grep over the full file at the head SHA, cross-checked via `gh pr diff`, `gh api contents` at the head SHA, and a local checkout). Nothing else in the crate emits `1049` either, so no other code path enters the buffer on the session's behalf.\n- The PR's own test (`a_raw_shell_enters_and_leaves_the_alternate_screen`, `:1590`) only waits for the enter bytes to arrive before dropping the channel; it never asserts that the leave sequence (`1049l`) is ever sent, so it cannot catch this.\n\n## Why it matters\n\n- Raw sessions keep repainting into scrollback for the whole session — exactly the #545 complaint.\n- On exit the terminal is told to *enter* the alternate screen right before disconnect; the \"re-send the last error after leaving, so a refused join stays readable in scrollback\" mechanism is prefixed with the enter sequence instead of the leave sequence, so the error lands on the alternate screen and disappears — the opposite of the PR's stated goal.\n\n## Acceptance criteria\n\n- A raw (non-command-mode) session writes `\\x1b[?1049h` to the channel before the first session frame.\n- Every exit path (normal quit, refused join, errored session) writes `\\x1b[?1049l`, and the stored last error, when present, is written *after* the leave sequence.\n- `ALT_SCREEN_LEAVE` is actually used (no dead constant), and a test asserts both the enter-at-start and leave-at-exit byte sequences on a live session, not just the enter bytes.\n- Command mode still never emits either sequence.\n\n## Verification note (added after filing, same run)\n\nThe PR head was built and its own test run in a scratch worktree (`cargo test --features ssh,sandbox --lib world_ssh::tests::a_raw_shell_enters_and_leaves_the_alternate_screen`):\n\n- rustc itself warns: ``constant `ALT_SCREEN_LEAVE` is never used`` (world_ssh.rs:50) and ``constant `INPUT_DROP_NOTICE_BYTES` is never used`` (world_ssh.rs:52) — compiler confirmation that both constants are dead.\n- The test **passes in 1.08s** — which is consistent with the bug, not against it: the test password's join is refused (compare `a_wrong_password_is_refused_inside_the_shell`), `run_session` ends, and after `REFUSED_SHELL_DELAY` (exactly 1s) `leave_alt_screen()` fires and sends the stored **enter** sequence plus the error, then closes the channel. The test loop sees the enter bytes — arriving at teardown, from the leave path — and passes. It never observes a leave sequence, and a live, accepted session receives no enter sequence from this code at all (grep over the whole repo at the head SHA finds no other `1049` emitter outside lockfiles/corpus data).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-22T16:20:25Z","url":"https://github.com/developing-today/code/issues/601"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:d914e0d0-5dfc-5e9d-8605-899587d363f9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE8CE:1CD523:7F3704:A5908D:6B062D04
html-safe-nonce94da4d00681b9def2d49ffc1ffb9689d566e0c4b9eea49d06e89976d9c06f977
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOENFOjFDRDUyMzo3RjM3MDQ6QTU5MDhEOjZCMDYyRDA0IiwidmlzaXRvcl9pZCI6IjEwNzcxMzM0Nzk4NjQ4Mzk0MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb8c77309d7222d80c1850dfbe86035c58c25f45b416d8aadb4188605caf8b6c3
hovercard-subject-tagrepository:627308783
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/developing-today/code/issues/601
twitter:imagehttps://opengraph.githubassets.com/c1a2d415bd2c796fea2e23b2fed64a1efc7802730482e5b3777242c3e81bd5e2/developing-today/code
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c1a2d415bd2c796fea2e23b2fed64a1efc7802730482e5b3777242c3e81bd5e2/developing-today/code
og:image:altContribute to developing-today/code development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3
turbo-cache-controlno-cache
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release494ea0bb1e0feef734a83e2628697647755e8864
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/601#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F601
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F601
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/601
Reloadhttps://github.com/developing-today/code/issues/601
Reloadhttps://github.com/developing-today/code/issues/601
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/601
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/601
#717https://github.com/developing-today/code/pull/717
id(ssh): PR #594 never enters the alternate screen during a session — its leave path sends the ENTER sequence and ALT_SCREEN_LEAVE is never usedhttps://github.com/developing-today/code/issues/601#top
#717https://github.com/developing-today/code/pull/717
https://github.com/dezren39
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 22, 2026https://github.com/developing-today/code/issues/601#issue-5983242988
#594https://github.com/developing-today/code/pull/594
#545https://github.com/developing-today/code/issues/545
#545https://github.com/developing-today/code/issues/545
id(ssh): use the alternate screen for raw interactive SSH sessions #545https://github.com/developing-today/code/issues/545
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 22, 2026https://github.com/developing-today/code/issues/601#event-33970483655
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#717https://github.com/developing-today/code/pull/717
on Oct 24, 2026https://github.com/developing-today/code/issues/601#event-34113648867
https://github.com/apps/developing-today-fleet
developing-today-fleethttps://github.com/apps/developing-today-fleet
on Nov 24, 2026https://github.com/developing-today/code/issues/601#issuecomment-7124553839
developing.today fleethttps://kaneo.security.cab
PR #717 — fix(id): enter the alternate screen at SSH session start, leave it at exithttps://github.com/developing-today/code/pull/717
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/601
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/601
dezren39https://github.com/dezren39
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.