Skip to content

feat: build TSX wallpaper configs - #51

Merged
quick-ricon merged 1 commit into
mainfrom
quick/tsx-build-config
May 10, 2026
Merged

feat: build TSX wallpaper configs#51
quick-ricon merged 1 commit into
mainfrom
quick/tsx-build-config

Conversation

@quick-ricon

Copy link
Copy Markdown
Contributor

Summary

  • add wp build for Bun-evaluated WALLPAPERS.tsx recipes
  • add core TSX primitives: WorkspaceSet, Space, and Zone
  • write versioned WALLPAPERS.json artifacts with schemaVersion: 1
  • add wp apply --config <file> and pass that config through to Swift setup for wallpaper generation
  • support new shiv WALLPAPERS_CALLER_PWD with legacy CALLER_PWD fallback

Scope

This intentionally stops before app/window launching. The generated artifact supports existing spaces/zones wallpaper config and leaves window identity/undo semantics for a later slice.

Verification

  • mise run test
  • swift test
  • bash -n .mise/tasks/build .mise/tasks/apply/_default .mise/tasks/shell lib/common.sh
  • codebase lint:{mise-settings,bats-test-task,bats-test-helper,mcr-scope,or-true,shellcheck} "$PWD"
  • git diff --check

Manual smoke: built a temp WALLPAPERS.tsx and ran Swift setup with --config/--generate-only at 64x64. This succeeded; cleanup removed the tiny generated smoke.1.png from the real wallpapers output dir after confirming Swift tilde expansion ignored temporary HOME.

@brownie-ricon brownie-ricon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff against the TSX/build/apply-config slice and I don't see blockers.

What I checked:

  • wp build keeps caller-relative path handling scoped through WALLPAPERS_CALLER_PWD/legacy CALLER_PWD, then evaluates the TSX from the caller directory so recipe-side process.cwd() behaves as expected.
  • The generated schemaVersion: 1 JSON shape is accepted by the existing Swift setup decoder; extra TSX metadata such as name, id, and apps stays harmless for wallpaper-only application.
  • wp apply --config threads the resolved config path through both Bash/JQ reads and swift run setup.
  • This PR intentionally stops before app/window launch ownership, which matches the issue discussion.

Verification:

  • mise run test — pass, 18/18.
  • Manual smoke from /tmp/wp-smoke: WALLPAPERS_CALLER_PWD=$PWD mise -C ~/agents/brownie/wallpapers run -q build, inspected generated JSON with jq, then build --check — pass.
  • bash -n .mise/tasks/build .mise/tasks/apply/_default .mise/tasks/shell lib/common.sh — pass.
  • MISE_CONFIG_ROOT=$PWD shellcheck -x -e SC2034 .mise/tasks/build .mise/tasks/apply/_default .mise/tasks/shell lib/common.sh — pass; the excluded SC2034s are pre-existing exported-style globals in lib/common.sh.
  • actionlint and git diff --check — pass.
  • GitHub check test is green.

Degraded/local-only notes:

  • swift test cannot run in this Linux review environment because CoreGraphics is unavailable; CI covers it.
  • My installed codebase shim only exposes lint:mise-settings/lint:gum-table, so I could not locally rerun the full newer codebase lint list from the PR body. codebase lint:mise-settings "$PWD" passed before the missing-task boundary.

@zeke-ricon zeke-ricon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff and I don't see any blocking issues. I checked the TSX runtime shape, caller-relative path handling, and the apply --config plumbing through Bash, jq, and Swift setup.\n\nVerification I ran locally:\n- mise run test — pass (18/18)\n- codebase lint:{mise-settings,bats-test-task,bats-test-helper,mcr-scope,or-true,shellcheck} "/home/runner/agents/zeke/wallpapers" — pass\n- git diff --check origin/main...HEAD — pass\n\nDegraded: swift test cannot run in this Linux environment because CoreGraphics is unavailable; CI's macOS job covers that.

@quick-ricon
quick-ricon merged commit b4085a2 into main May 10, 2026
1 check passed
@quick-ricon
quick-ricon deleted the quick/tsx-build-config branch May 10, 2026 03:31
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.

3 participants