René's URL Explorer Experiment


Title: fix(workspace/builder): Wait for shell prompt before layout and commands by tony · Pull Request #1018 · tmux-python/tmuxp · GitHub

Open Graph Title: fix(workspace/builder): Wait for shell prompt before layout and commands by tony · Pull Request #1018 · tmux-python/tmuxp

X Title: fix(workspace/builder): Wait for shell prompt before layout and commands by tony · Pull Request #1018 · tmux-python/tmuxp

Description: Summary Fixes #365 (open since March 2018). WorkspaceBuilder sends SIGWINCH (via select_layout) and commands (via send_keys) to panes before their shell finishes initializing. With zsh, this produces the PROMPT_SP partial-line marker — an inverse+bold %. Root cause traced through tmux and zsh source: tmux screen_reinit() initializes new pane cursors at (0, 0) (screen.c:107-108). select_layout triggers ioctl(TIOCSWINSZ) on the pane PTY (window.c:449), delivering SIGWINCH to the child shell. zsh preprompt() (utils.c:1530) runs the PROMPT_SP heuristic (utils.c:1545-1566) before every prompt, outputting the PROMPT_EOL_MARK (default %B%S%#%s%b). When SIGWINCH arrives mid-init, the interrupted redraw leaves the % marker visible. Fix: Poll pane cursor position until it moves from origin (0, 0) — indicating the shell has drawn its prompt — before calling select_layout. This ensures SIGWINCH only arrives after the shell can handle resize gracefully. Changes Add _wait_for_pane_ready() that polls cursor_x/cursor_y via pane.refresh() (2s timeout, 50ms interval) Call readiness check before select_layout in iter_create_panes() for all default-shell panes Wait for blank panes too (- pane shorthand expands to shell_command: []) Remove redundant select_layout call in build() that doubled SIGWINCH signals Add 6 tests: readiness detection, timeout, parametrized call counts, layout deduplication Test plan uv run ruff check . --fix --show-fixes — clean uv run ruff format . — unchanged uv run mypy — no issues in 120 files uv run py.test -vvv — 1027 passed, 2 skipped Manual: tmuxp load projects with 12-window × 4-pane zsh config — no % markers

Open Graph Description: Summary Fixes #365 (open since March 2018). WorkspaceBuilder sends SIGWINCH (via select_layout) and commands (via send_keys) to panes before their shell finishes initializing. With zsh, this produc...

X Description: Summary Fixes #365 (open since March 2018). WorkspaceBuilder sends SIGWINCH (via select_layout) and commands (via send_keys) to panes before their shell finishes initializing. With zsh, this produc...

Opengraph URL: https://github.com/tmux-python/tmuxp/pull/1018

X: @github

direct link

Domain: github.com

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/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e2ca57b8-8a1d-6d80-48b5-ade77d4e2876
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB49A:1C0339:420015:597154:6B006DDD
html-safe-nonced9899a9a9088db4ec754afb49acd47665331829acc3e4d128adfe1c6122a1269
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDlBOjFDMDMzOTo0MjAwMTU6NTk3MTU0OjZCMDA2REREIiwidmlzaXRvcl9pZCI6IjgyODAyNTU2MTQ4MjM3MjI0NjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac79c7747b235ebdbcb123261d676e2cdc35f79d76f8bfe32c5bbfa57482a2a4da
hovercard-subject-tagpull_request:3369727719
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/tmux-python/tmuxp/pull/1018/files
twitter:imagehttps://avatars.githubusercontent.com/u/26336?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/26336?s=400&v=4
og:image:altSummary Fixes #365 (open since March 2018). WorkspaceBuilder sends SIGWINCH (via select_layout) and commands (via send_keys) to panes before their shell finishes initializing. With zsh, this produc...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None6527e91c60c0b29d16606ff32ac5df8ecdc37a2a62205ea057a14d7762c870fa
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/tmux-python/tmuxp git https://github.com/tmux-python/tmuxp.git
octolytics-dimension-user_id37234308
octolytics-dimension-user_logintmux-python
octolytics-dimension-repository_id12398170
octolytics-dimension-repository_nwotmux-python/tmuxp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id12398170
octolytics-dimension-repository_network_root_nwotmux-python/tmuxp
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release46f1cd2ae3cd8ae1a81019b5d619742e76f13bbd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/tmux-python/tmuxp/pull/1018/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftmux-python%2Ftmuxp%2Fpull%2F1018%2Ffiles
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%2Ftmux-python%2Ftmuxp%2Fpull%2F1018%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=tmux-python%2Ftmuxp
Reloadhttps://github.com/tmux-python/tmuxp/pull/1018/files
Reloadhttps://github.com/tmux-python/tmuxp/pull/1018/files
Reloadhttps://github.com/tmux-python/tmuxp/pull/1018/files
tmux-pythonhttps://github.com/tmux-python
tmuxphttps://github.com/tmux-python/tmuxp
Codehttps://github.com/tmux-python/tmuxp
Issues113 (113)https://github.com/tmux-python/tmuxp/issues
Pull requests29 (29)https://github.com/tmux-python/tmuxp/pulls
Discussionshttps://github.com/tmux-python/tmuxp/discussions
Actionshttps://github.com/tmux-python/tmuxp/actions
Security and qualityhttps://github.com/tmux-python/tmuxp/security
Insightshttps://github.com/tmux-python/tmuxp/insights
Sign up for GitHub https://github.com/signup?return_to=%2Ftmux-python%2Ftmuxp%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftmux-python%2Ftmuxp%2Fissues%2Fnew%2Fchoose
tonyhttps://github.com/tony
masterhttps://github.com/tmux-python/tmuxp/tree/master
pane-readinesshttps://github.com/tmux-python/tmuxp/tree/pane-readiness
Conversation 2 https://github.com/tmux-python/tmuxp/pull/1018
Commits 7 https://github.com/tmux-python/tmuxp/pull/1018/commits
Checks 13 https://github.com/tmux-python/tmuxp/pull/1018/checks
Files changed https://github.com/tmux-python/tmuxp/pull/1018/files
Please reload this pagehttps://github.com/tmux-python/tmuxp/pull/1018/files
fix(workspace/builder): Wait for shell prompt before layout and commands https://github.com/tmux-python/tmuxp/pull/1018/files#top
Show all changes 7 commits https://github.com/tmux-python/tmuxp/pull/1018/files
2b3eb13 workspace/builder(fix[pane-readiness]): Wait for shell prompt before … tony Mar 8, 2026 https://github.com/tmux-python/tmuxp/pull/1018/commits/2b3eb13e5944b2605050abdea4a530cfc448a26f
8db8479 docs(CHANGES) Pane-readiness fix for zsh partial-line marker tony Mar 8, 2026 https://github.com/tmux-python/tmuxp/pull/1018/commits/8db8479bd0a9fcbee091deec58085c6a1fcf60d7
f669002 workspace/builder(fix[logging]): Preserve exception traceback in read… tony Mar 8, 2026 https://github.com/tmux-python/tmuxp/pull/1018/commits/f669002eba052d90038bc4072cf7fa880757e195
0139018 tests/workspace/builder(test[pane-readiness]): Add window_shell readi… tony Mar 8, 2026 https://github.com/tmux-python/tmuxp/pull/1018/commits/0139018a5ebd0cef1f55efa71c75851ab421a5d2
d3c0c87 workspace/builder(docs[pane-readiness]): Document shell-skip heuristi… tony Mar 8, 2026 https://github.com/tmux-python/tmuxp/pull/1018/commits/d3c0c87f2a2c88e4716368c708ef13f048c353ce
818466e workspace/builder(fix[doctest]): Increase readiness doctest timeout t… tony Mar 8, 2026 https://github.com/tmux-python/tmuxp/pull/1018/commits/818466e9238c3d34d6aa28ffaf02dd84dc0e03cb
9debb02 conftest(fix[doctest]): Add rerun markers for tmux-dependent doctests tony Mar 8, 2026 https://github.com/tmux-python/tmuxp/pull/1018/commits/9debb0267d5cd63a769402f724192eacf5ead6cf
Clear filters https://github.com/tmux-python/tmuxp/pull/1018/files
Please reload this pagehttps://github.com/tmux-python/tmuxp/pull/1018/files
Please reload this pagehttps://github.com/tmux-python/tmuxp/pull/1018/files
CHANGES https://github.com/tmux-python/tmuxp/pull/1018/files#diff-aac07aefec754086f5c344e2c233862f6a611c739b5647fd456c1b77d3577c79
conftest.py https://github.com/tmux-python/tmuxp/pull/1018/files#diff-a31c7ed5d35f5ed8233994868c54d625b18e6bacb6794344c4531e62bd9dde59
builder.py https://github.com/tmux-python/tmuxp/pull/1018/files#diff-bca3536de955c4053c51d3d67b6ca87e1f4b185a10618ae3e1abab65ecf0cad2
test_builder.py https://github.com/tmux-python/tmuxp/pull/1018/files#diff-4b7111dc0aa90ef0112f07fb34db324d25e8d33fc521b2a375aa5a9847c030e8
CHANGEShttps://github.com/tmux-python/tmuxp/pull/1018/files#diff-aac07aefec754086f5c344e2c233862f6a611c739b5647fd456c1b77d3577c79
View file https://github.com/tmux-python/tmuxp/blob/9debb0267d5cd63a769402f724192eacf5ead6cf/CHANGES
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/tmux-python/tmuxp/pull/1018/{{ revealButtonHref }}
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-aac07aefec754086f5c344e2c233862f6a611c739b5647fd456c1b77d3577c79
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-aac07aefec754086f5c344e2c233862f6a611c739b5647fd456c1b77d3577c79
conftest.pyhttps://github.com/tmux-python/tmuxp/pull/1018/files#diff-a31c7ed5d35f5ed8233994868c54d625b18e6bacb6794344c4531e62bd9dde59
View file https://github.com/tmux-python/tmuxp/blob/9debb0267d5cd63a769402f724192eacf5ead6cf/conftest.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/tmux-python/tmuxp/pull/1018/{{ revealButtonHref }}
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-a31c7ed5d35f5ed8233994868c54d625b18e6bacb6794344c4531e62bd9dde59
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-a31c7ed5d35f5ed8233994868c54d625b18e6bacb6794344c4531e62bd9dde59
src/tmuxp/workspace/builder.pyhttps://github.com/tmux-python/tmuxp/pull/1018/files#diff-bca3536de955c4053c51d3d67b6ca87e1f4b185a10618ae3e1abab65ecf0cad2
View file https://github.com/tmux-python/tmuxp/blob/9debb0267d5cd63a769402f724192eacf5ead6cf/src/tmuxp/workspace/builder.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/tmux-python/tmuxp/pull/1018/{{ revealButtonHref }}
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-bca3536de955c4053c51d3d67b6ca87e1f4b185a10618ae3e1abab65ecf0cad2
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-bca3536de955c4053c51d3d67b6ca87e1f4b185a10618ae3e1abab65ecf0cad2
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-bca3536de955c4053c51d3d67b6ca87e1f4b185a10618ae3e1abab65ecf0cad2
tonyhttps://github.com/tony
Mar 8, 2026https://github.com/tmux-python/tmuxp/pull/1018/files#r2901752397
Please reload this pagehttps://github.com/tmux-python/tmuxp/pull/1018/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
#793https://github.com/tmux-python/tmuxp/pull/793
#800https://github.com/tmux-python/tmuxp/issues/800
8a59203https://github.com/tmux-python/tmuxp/commit/8a59203f6d168f0b56b20cba95aeba3e767a27bf
0777c3bhttps://github.com/tmux-python/tmuxp/commit/0777c3bbef652c4d4a595606f6d8987f686a08a2
Please reload this pagehttps://github.com/tmux-python/tmuxp/pull/1018/files
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-bca3536de955c4053c51d3d67b6ca87e1f4b185a10618ae3e1abab65ecf0cad2
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-bca3536de955c4053c51d3d67b6ca87e1f4b185a10618ae3e1abab65ecf0cad2
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-bca3536de955c4053c51d3d67b6ca87e1f4b185a10618ae3e1abab65ecf0cad2
tests/workspace/test_builder.pyhttps://github.com/tmux-python/tmuxp/pull/1018/files#diff-4b7111dc0aa90ef0112f07fb34db324d25e8d33fc521b2a375aa5a9847c030e8
View file https://github.com/tmux-python/tmuxp/blob/9debb0267d5cd63a769402f724192eacf5ead6cf/tests/workspace/test_builder.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/tmux-python/tmuxp/pull/1018/{{ revealButtonHref }}
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-4b7111dc0aa90ef0112f07fb34db324d25e8d33fc521b2a375aa5a9847c030e8
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-4b7111dc0aa90ef0112f07fb34db324d25e8d33fc521b2a375aa5a9847c030e8
https://github.com/tmux-python/tmuxp/pull/1018/files#diff-4b7111dc0aa90ef0112f07fb34db324d25e8d33fc521b2a375aa5a9847c030e8
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

Viewport: width=device-width


URLs of crawlers that visited me.