Skip to content

Showcase the core library's capabilities with tested examples #243

Open
0 of 13 issues completed
Open

Description

@tony

Summary

The Core API tab on a language page, and the Core Library home, show one quickstart program under "Start with ". They should show what the core library does: a list of capabilities on the left and, on the right, a tested example of the one selected.

Motivation

Requested by the maintainer on 2026-11-01: "You should showcase what it is", with these capabilities:

  1. Navigate tmux via a typed object graph
  2. Watch for changes
  3. Send keys
  4. Run applications (tmux 3.8+, only in some ports such as TypeScript)
  5. Rename windows
  6. Create windows
  7. Move windows
  8. Set layouts

"The code examples MUST be tested and confirmed to work across ports. Only TS have a true 'run' that checks for exit codes."

Proposal

  1. One component, used on /<port>/<version>/ (Core API tab) and /<port>/<version>/core/. On the left, the capability list, as a searchable picker on narrow screens, reusing the site's existing picker. On the right, the selected example. The selection is kept in the URL.
  2. An example is shown only when the port's CI executes it and the run fails on a non-zero exit or a missing expected line. Each entry records the file, the excerpt anchors, the CI workflow and job, the command, and the evidence that exit status is checked. A build-time test refuses an entry without that evidence.
  3. A capability a port lacks, or has no executed example for, is not offered for that port. Version-gated capabilities carry their tmux floor.
  4. Per port, add the missing example programs and an exit-checked runner modelled on the TypeScript harness, as port issues linked here.

References

Lua showcase

A local build rendered all eight Lua programs on both Core and landing pages and ran the copied programs against an installed rock. The public website PR starts with four programs at a public source pin. The eight-program selection needs the reviewed native source and successful trunk CI before publication. Website PR · Native acceptance · Eight-program verification

Sub-issues

Sub-issues

0 of 13 Issues completed
Loading 13 sub-issues

Activity

  1. added
    enhancement
    on Nov 1, 2026
  2. tony commented on Dec 5, 2026

    @tony
    ContributorAuthor

    I ran the Lua examples for all eight entries against the checkout that combines the navigation, calculator, and program changes. The Core page and the language landing page each showed all eight once. Each “copy” button returned the example as it appears in the Lua repository. The oldest supported tmux, 3.3a, can run seven. “Watch for changes” reads pane output through control mode and needs tmux 3.7 or newer.

    Updating the example list exposed a problem for readers of older releases. The original Lua quickstart still appeared, but its links to Server.new_session, Pane.split, and Session.new_window disappeared. Selecting the API links for the displayed example kept all three on both pages. The released catalog passed 53 checks. The eight-example build passed 455 checks across five website suites.

    The four-example change in #388 already preserves those links. The eight-example update needs the Lua commit that contains the new programs and the passing CI run on that commit. The relevant Lua changes are navigation and layouts, the calculator, and running a program and reading its exit code.

  3. added
    area:examples
    p2
    topic:examples
    on Dec 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:examplesenhancementp2topic:examples

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions