Repository navigation
Show tmuxp's example catalog for six ports' workspaces - #285
Merged
Merged
Conversation
why: The preset picker appears only for a port whose tests load more than one workspace file. Go and C# showed one file each and C++ three inline documents, so their Workspace Manager pages had no picker. libtmux-go#159, libtmux-dotnet#159 and libtmux-cxx#157 add tmuxp's 23-file catalog as fixtures with a test that loads every file; this names those files and tests. Part of #282. what: - Add tmuxpCatalog to the workspace sources, which maps tmuxp's files to their topics and cites the tests that load them, and use it for Go, C# and C++ in place of their single or inline examples - Pin Go to a0592f87f, C# to 4d6bd6718 and C++ to 51d209f5e, the merge commits that carry the catalog, with the API model's revision each pin was chosen against; the model does not move - Leave out each file a library loader refuses and show it on the loader the load command calls: Go and C# cite both loaders, C++ cites parse_tmuxp and omits env-variables, which it refuses - Drop Go's library-only mark on shorthands, which its tests now load through the command's loader - Mark five C# presets as caveats: the load command takes window_shell, sleep_before and suppress_history, which WorkspaceFile.Parse refuses; cite the key lists that show it - Regenerate workspace-showcase.json: Go 22 examples, C# 22, C++ 21 - Move the landing and picker tests to the new data: Go, C++ and C# open on three-pane and offer a picker, and Ruby stands for a port with one preset - Close each landing-page window when its test ends; three more pickers of 22 presets ran the test file out of the default heap - Point the negative check's quoted-document cases at Julia, the one port left that quotes a document
…hell why: Ruby, Julia and PowerShell loaded one or six workspace files, so their pickers had one preset or a handful, while Rust offers tmuxp's whole catalog. libtmux-ruby#102, libtmux-julia#83 and libtmux-powershell#81 add the catalog as fixtures with a test that reads every file. Part of #282. what: - Pin Ruby to 9e1fbe1a9, Julia to dc6096bb0 and PowerShell to aaf857bb1, the merge commits that carry the catalog, each with the API model's revision it was chosen against; the model does not move - Show six Ruby files, fifteen Julia files and nine PowerShell files, tested by the catalog test of each port; keep Ruby's tiled example and Julia's quoted document beside them - Keep out of Ruby the three files that load but that the support table marks unsupported, because the loader reads their `~` paths and bare `pane` entries differently from tmuxp; leave the table as it is - Keep out of PowerShell blank-panes, env-variables and focus-window-and-panes for the same reason, and keep its curated window_options, environment_vars and first_pane_start_directory examples for their topics: their tests run the command against real tmux, and the catalog test only imports the file - Close Julia's quoted document at the testset's new indentation - Let a catalog skip files and name a prefix, for PowerShell's tmuxp-v1.74.0- names - Regenerate workspace-showcase.json: Ruby 7 examples, Julia 16, PowerShell 15 - Move the tests to the new data: every port with a showcase now offers a picker, and the one-preset case runs on a showcase cut to one file
why: A topic shows one file. The first commit gave Go's environment, C#'s two-pane and C++'s two-pane and main-horizontal topics to the catalog file, which a test only parses, and dropped the examples whose tests run the load command or build the document on a real tmux server. Real-tmux evidence is stronger than a parse, and PowerShell already keeps its curated examples for that reason. Part of #282. what: - Restore Go's quoted environment document, run by TestLoadFreezeReloadAppendAndEnvironment on a real tmux server - Restore C#'s quoted README document, run through tmux-workspace load by The_quickstart_workspace_builds_what_the_readme_describes - Restore C++'s two-pane and main-horizontal documents, built on a real server by AParsedDocumentBuildsOnARealServer and FocusAndOptionsLandOnTheBuiltSession; its shorthand document only parsed, so the catalog's shorthands.yaml replaces it - Skip the catalog file for each restored topic: session-environment for Go, 2-pane-vertical for C#, 2-pane-vertical and main-pane-height for C++; they stay marked as tested under the other topic's file - Regenerate workspace-showcase.json: Go 22 examples, C# 22, C++ 21 - Expect Go to open on environment and C# on two-pane
tony
marked this pull request as ready for review
November 8, 2026 18:32
tony
temporarily deployed
to
docs-preview-cleanup
November 8, 2026 18:32 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The workspace overview and the landing page show a preset picker only for a port whose tests load more than one workspace file. Six ports now keep tmuxp's example catalog as fixtures and load every file in a test (go #159, dotnet #159, cxx #157, ruby #102, julia #83, powershell #81, all merged). This names those files and tests in
scripts/lib/workspace-showcase-sources.mjsand regeneratesworkspace-showcase.json, so each of the six offers a picker.Part of #282.
a0592f87fTestEveryTmuxpExampleParses,TestEveryTmuxpExampleNormalizesenvironmentdocument (real tmux)4d6bd6718Every_tmuxp_example_parses,Every_tmuxp_example_loads_through_the_commands_own_loadertwo-panedocument (runsload)51d209f5eEveryTmuxpExampleParsestwo-paneandmain-horizontal(real tmux builds)9e1fbe1a9test_tmuxp_examples_load_through_workspace_loadtiled(runs the installed executable)dc6096bb0tmuxp example catalogshell-command-beforedocumentaaf857bb1tmuxp example catalogwindow_options,environment_vars,first_pane_start_directory,skip-sendandskip-send-pane-level,corpusWhat moved
Each pin is a
revisionin the port's sources, with the API model's revision it was chosen against (modelRevision). The generator refuses a pin once the model records it or passes it. The API models themselves do not move here, so the pins stay until the model catches up, as the contributing guide says.What each port shows, and what it leaves out
loadcommand calls, and cite both tests; the files only the library refuses are cited by the command's loader alone.plugin-system; so do these.environment, C#'stwo-pane, C++'stwo-paneandmain-horizontal, PowerShell's three. C++'sshorthanddocument only parsed, so the catalog'sshorthands.yamlreplaces it. Hidden catalog files still count as tested under the curated topic.loadcommand takeswindow_shell,sleep_beforeandsuppress_history, whichWorkspaceFile.Parserefuses, with a citation of the key lists. Go loses its library-only mark onshorthands, which the generator refused once the file was shown.env-variables(the command runsbefore_scriptitself;parse_tmuxprefuses it), so the table is unchanged and the file is not shown.focus-window-and-panes,main-pane-heightandstart-directoryload but the table marks them unsupported, because the loader reads their~paths and barepaneentries differently from tmuxp. They stay hidden and the table is as it was.blank-panes,env-variablesandfocus-window-and-panesload but the table marks them unsupported (apaneorblankentry is typed into the shell; names andbefore_scriptare not expanded); they stay hidden and the table is as it was.window_options,environment_varsandfirst_pane_start_directoryexamples for themain-horizontal,environmentandstart-directorytopics, over the catalog'smain-pane-height,session-environmentandstart-directory. A topic shows one file, and the curated files are tested by a test that runs the command against real tmux, where the catalog test only imports the file. Itsskip-sendexamples stay for the same reason.explicit expansion and inheritancedocument now closes at the testset's new indentation ('\n """)').minimal,options, the sleep and skip-send files;plugin-systemis omitted as for Rust).Tests
The landing and picker tests assumed one-file ports. Every port with a showcase now offers a picker, so the one-preset case runs on a showcase cut to one file, and the landing test expects nine pickers. The landing test file also ran out of the default Node heap with three more 22-preset pickers: it now closes each happy-dom window when its test ends. The negative check's quoted-document cases moved from Go to Julia, the one port that still quotes a document.
Test plan
node scripts/gen-workspace-showcase.mjs, then--check(cache matches 154 revision-bound examples) andgen-workspace-showcase.negative.mjsvitest run test/workspace-showcase.test.ts test/workspace-picker.test.ts test/port-landing-page.test.ts: 159 passed/?product=workspacefor go (22 presets, picker present) and powershell (15 presets, picker present)vitest runinsite/: 268 files passed, 5 skipped (assembled-site suites run only in CI)