Skip to content

Show tmuxp's example catalog for six ports' workspaces - #285

Merged
tony merged 3 commits into
mainfrom
feat/tmuxp-catalog-go-dotnet-cxx
Nov 8, 2026
Merged

tony merged 3 commits into
mainfrom
feat/tmuxp-catalog-go-dotnet-cxx

Conversation

@tony

@tony tony commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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.mjs and regenerates workspace-showcase.json, so each of the six offers a picker.

Part of #282.

Port Pinned to Examples before Examples now Cited catalog test Curated example kept
go a0592f87f 1 22 TestEveryTmuxpExampleParses, TestEveryTmuxpExampleNormalizes the quoted environment document (real tmux)
csharp 4d6bd6718 1 22 Every_tmuxp_example_parses, Every_tmuxp_example_loads_through_the_commands_own_loader the quoted README two-pane document (runs load)
cxx 51d209f5e 3 21 EveryTmuxpExampleParses two-pane and main-horizontal (real tmux builds)
ruby 9e1fbe1a9 1 7 test_tmuxp_examples_load_through_workspace_load tiled (runs the installed executable)
julia dc6096bb0 1 16 tmuxp example catalog the quoted shell-command-before document
powershell aaf857bb1 6 15 tmuxp example catalog window_options, environment_vars, first_pane_start_directory, skip-send and skip-send-pane-level, corpus

What moved

Each pin is a revision in 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

  • A loader that refuses a file does not show it. Go (library parser) and C# (library decoder) also read every file through the loader the load command calls, and cite both tests; the files only the library refuses are cited by the command's loader alone.
  • Rust omits plugin-system; so do these.
  • Where a catalog file shares a topic with a curated example whose test runs the command or builds on real tmux, the curated example stays and the catalog file for that topic is hidden: Go's environment, C#'s two-pane, C++'s two-pane and main-horizontal, PowerShell's three. C++'s shorthand document only parsed, so the catalog's shorthands.yaml replaces it. Hidden catalog files still count as tested under the curated topic.
  • C# gains five caveats on the support table: the load command takes window_shell, sleep_before and suppress_history, which WorkspaceFile.Parse refuses, with a citation of the key lists. Go loses its library-only mark on shorthands, which the generator refused once the file was shown.
  • C++ already carried the right caveat for env-variables (the command runs before_script itself; parse_tmuxp refuses it), so the table is unchanged and the file is not shown.
  • Ruby loads nine, shows six. focus-window-and-panes, main-pane-height and start-directory load but the table marks them unsupported, because the loader reads their ~ paths and bare pane entries differently from tmuxp. They stay hidden and the table is as it was.
  • PowerShell loads seventeen, shows nine new ones. blank-panes, env-variables and focus-window-and-panes load but the table marks them unsupported (a pane or blank entry is typed into the shell; names and before_script are not expanded); they stay hidden and the table is as it was.
  • PowerShell keeps its curated window_options, environment_vars and first_pane_start_directory examples for the main-horizontal, environment and start-directory topics, over the catalog's main-pane-height, session-environment and start-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. Its skip-send examples stay for the same reason.
  • Julia's quoted explicit expansion and inheritance document now closes at the testset's new indentation ('\n """)').
  • Julia shows 15 catalog files and leaves out the seven its loader refuses (minimal, options, the sleep and skip-send files; plugin-system is 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) and gen-workspace-showcase.negative.mjs
  • vitest run test/workspace-showcase.test.ts test/workspace-picker.test.ts test/port-landing-page.test.ts: 159 passed
  • Dev server at /?product=workspace for go (22 presets, picker present) and powershell (15 presets, picker present)
  • Full vitest run in site/: 268 files passed, 5 skipped (assembled-site suites run only in CI)
  • CI

tony added 3 commits November 8, 2026 07:23
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
tony marked this pull request as ready for review November 8, 2026 18:32
@tony
tony merged commit 5875d25 into main Nov 8, 2026
3 checks passed
@tony
tony temporarily deployed to docs-preview-cleanup November 8, 2026 18:32 — with GitHub Actions Inactive

This branch was previously deployed

2 inactive deployments
docs-preview-cleanup — ad1f630b Deployed Nov 8, 2026 by tony via cleanup #217
docs-preview — ad1f630b Deployed Nov 8, 2026 by tony via publish-preview / publish #1289
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant