Declare a showcase frame for the hqtui.com apps gallery - #16
Merged
Conversation
hqtui.com/apps captures screenshots of applications built on the library. The capture script takes an application directory and imports `scripts/showcase.ts` from it, because only the application knows what a good state looks like. A fixture rather than a live board. The test suite already drives the client against a real server, and a screenshot needs the opposite property: it has to be identical on every capture, or the image churns in every diff and nobody can review what changed. Built from the real exported ForumNode and TopicSummary with no casts, so this stops compiling if the view model moves. The topics screen rather than the forum list, because it is the one that shows the state the view actually encodes -- unread, solved, locked, selection, reply counts and relative ages. Build-time fixture only; nothing here ships. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Df2FNu5DhinMV2soRz3cy
The showcase frame is written against the real exported types precisely so it stops compiling when the view model moves. That only works if the project actually compiles it, and the include list stopped at test/. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Df2FNu5DhinMV2soRz3cy
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.
hqtui.com/apps captures screenshots of applications built on the library. The capture script takes an application directory and imports
scripts/showcase.tsfrom it, because only the application knows what a good state looks like.This adds ours: the topics screen.
The topics screen rather than the forum list, because it is the one that shows the state the view actually encodes: unread (
*), solved (✓), locked (L), selection (>), reply counts and relative ages.Why a fixture when the tests use a real board
test/tui.test.tsdrives the client against an in-process server, which is right for tests. A screenshot needs the opposite property — it has to be identical on every capture, or the image churns in every diff and nobody can review what actually changed.Two commits
The frame, built from the real exported
ForumNodeandTopicSummarywith no casts, so it stops compiling if the view model moves.scripts/added to the tsconfig include. That guarantee is worth nothing if the project never compiles the file, and the include list stopped attest/. Confirmed with--listFilesthatscripts/showcase.tsis now in the program — it was not before.Checks
pnpm typecheck(tsc -p tsconfig.json --noEmit): exit 0, with the new file in the programnode --test "test/*.test.ts": 192 pass, 0 failrenderToText, not a mock-upBuild-time fixture only. Nothing here ships, and no application code changed.
🤖 Generated with Claude Code
https://claude.ai/code/session_017Df2FNu5DhinMV2soRz3cy