Skip to content

feat: add interactive Codex mascot creation and canvas integration - #139

Merged
howdeploy merged 3 commits into
howdeploy:mainfrom
CLOSETTTY:feat/codex-mascots
Oct 12, 2026
Merged

howdeploy merged 3 commits into
howdeploy:mainfrom
CLOSETTTY:feat/codex-mascots

Conversation

@CLOSETTTY

@CLOSETTTY CLOSETTTY commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add Settings > Mascots so a user can start an interactive Codex workflow from a PNG or JPEG, review the generated character and animations in CanvasTTY's browser, and install the approved result as a transparent canvas mascot.

The workflow is bundled with the application and can also be used as a portable Codex skill. It preserves source images, character identity and the complete action plan; it measures body/prop scale and atlas placement, reviews every playback step, and keeps visual approval separate from installation consent. Mechanical checks do not claim to guarantee generative quality.

Included changes

  • Creation UI: English/Russian Mascots settings, file picker and drag/drop, source preview, project/session access, failure status, retry and full installation logs. Accept PNG/JPG/JPEG with or without a background, up to 20 MB and 32–4096 pixels per dimension.
  • Codex launch: one new chat with one image and the complete launch brief, explicit YOLO/bypass disclosure using the existing acknowledgement, and CanvasTTY browser access for the live workbench. Preserve normal launch behavior for other sessions/providers.
  • Portable pipeline/skill: full-body preparation and optional appearance revision, suggested/custom actions and object interactions, source-to-atlas scale/contact checks, detailed face/material/hair/prop/effect continuity review, deterministic step inspection, live playback, build-specific approval and resumable project evidence.
  • Successful motion examples: neutral atlas/data sets containing 152, 39 and 16 drawings, plus an unchanged-art placement regression. The bundle adds approximately 46 MB before compression. These are motion/review references, not the new character's identity or a promise of error-free generation.
  • Canvas presentation: transparent parent card, drag through the mascot, interactive animation menu, proportional narrow-card resizing, hover controls with touch resize support, current-package reload on update, and continued rendering at summary zoom. Other canvas plugins retain their normal presentation.
  • Verified local delivery: register only a contained static mascot package; preserve the previous installed revision; reject unknown unregistered destination directories; retry corrected requests after failure without restarting; expose requested/installed/registered state and full diagnostic logs.
  • Explicit drafts: separate draft acceptance from final visual approval, preserve the full plan/deferred phases, and retain user-accepted unresolved limitations. No manual registry edits or handwritten installation handoffs.
  • Windows launch prerequisite: use PowerShell syntax for Codex lifecycle/plugin/decision hooks, retaining stdin/environment/exit status and other providers' existing hook behavior.
  • Documentation and checks: maintainer/user guide, host and launch regression tests, Python pipeline checks on Ubuntu/macOS, packaged Linux AppImage checks and bundled macOS resource checks.

How to try it

  1. Run the application from this branch using the repository's normal development/build setup.
  2. Install/authenticate Codex CLI and provide a Python 3.10+ environment with Pillow and NumPy. Set CANVASTTY_MASCOT_PYTHON if using a virtual environment. The Codex session needs image-generation/editing tools and the CanvasTTY agent browser connector.
  3. Open Settings > Mascots > Create mascot and upload a PNG or JPEG. The dialog explains the bypass launch before starting it.
  4. Approve the prepared character, choose an example/custom action, and inspect source frames, deterministic atlas steps and playback in the local browser workbench.
  5. Approve the identified final result, or explicitly accept a disclosed draft, then approve installation. Check the resulting transparent card's menu, drag, proportional resize, close and summary zoom.
  6. For rejected handoffs, inspect Open full log and use Retry installation after correction; no application restart or manual plugin copy is needed.

See the mascot guide and the complete pipeline/skill for the contracts. The committed bundle excludes user profiles, conversation exports, generated test projects, private paths, credentials, logs and development executables.

Linux and macOS integration

The PR ships portable source/resources, not the Windows preview executable. Filesystem paths and process spawning use the host's platform APIs; Python and the existing Codex launch path support Linux and macOS. Shared Electron packaging includes the pipeline on each platform. Existing Linux isolation/provider protections are preserved.

  • Ubuntu checks cover application regressions, installer builds, embedded mascot resources, packaged AppImage startup, terminal rendering and browser behavior.
  • macOS checks build the existing Apple Silicon application, verify embedded mascot resources, then check packaged CLI resolution, terminal rendering and browser input.
  • Python intake/build/delivery and real-art placement checks run on both Ubuntu and macOS.

The guide includes a distribution-independent Python virtual-environment setup. On macOS the same Python 3.10+ environment with Pillow and NumPy is required. If a packaged app does not inherit the terminal's Python environment, launch its executable explicitly with the interpreter selected:

CANVASTTY_MASCOT_PYTHON="/absolute/path/to/venv/bin/python" \
  "/Applications/CanvasTTY.app/Contents/MacOS/CanvasTTY"

Adjust the application location to its actual installation. Image generation requires the user's authenticated Codex and available generation/browser tools on every platform. A live mascot-generation session on the user's exact OS remains a separate acceptance check.

Validation and release limits

Local Windows validation:

  • npm test: 1,716 passed, 135 skipped, 0 failed (1,851 tests).
  • npm run typecheck: passed.
  • npx electron-vite build: production main/preload/renderer bundles passed.
  • npm run audit:secrets: repository source and built bundle passed.
  • Python pipeline smoke test and real-art placement regression: passed.
  • CI workflow YAML parsing and staged whitespace validation: passed.

The local broad Windows test run used an existing staged named-pipe helper whose native source is unchanged from upstream; Visual Studio C++ tools are absent on this workstation. The remote Windows CI subsequently rebuilt and self-tested that helper, ran the Windows tests/type-check, and successfully built the Windows installers.

Remote verification of the exact PR head, 7179de15209698f542241c20064fbffece13704a:

  • CI run #3 in the contributor fork: all five jobs passed.
  • Ubuntu verify: application tests, companion tests, type-check, production bundles, Linux AppImage/deb builds, embedded mascot resources, packaged AppImage startup, terminal and browser/helper smoke checks.
  • Windows windows-pipe-host: native helper build/self-test, application tests, type-check and installer packaging.
  • macOS macos-cli-resolution: Apple Silicon app packaging, embedded mascot workflow/player, packaged CLI resolution, terminal rendering and browser input.
  • mascot-pipeline on Ubuntu and macOS: Python smoke contracts and real-art placement regression.

The upstream pull-request workflow may still require a maintainer's approval for the first contribution from this fork. The linked fork run verifies the same head without changing upstream approval policy. Approve and rerun upstream CI before merging according to the repository's policy.

This PR is ready for code review and integration consideration; it does not publish a release. The rebased branch has not been exercised as a complete live mascot-creation session on all three platforms. Live generation and mascot-card interaction should be reviewed before release. Image generation remains interactive and can require repairs; synthetic QA and reference assets do not establish artistic quality.

@CLOSETTTY
CLOSETTTY marked this pull request as ready for review October 9, 2026 11:53
@howdeploy
howdeploy merged commit 60791a0 into howdeploy:main Oct 12, 2026
howdeploy added a commit that referenced this pull request Oct 12, 2026
This integrates the six contributions accepted during the maintainer's DEV review, together with the maintainer's local UI and minimap fixes. Rejected orchestration features, including #133, are excluded entirely.

## Included contributions and credit

- #125 by @tab11pm: read-only file cards, directory browsing, and richer Markdown/code previews.
- #130 by @SaneSanders: image/material remarks and handoff to an existing agent session.
- #131 by @BIackFIame: macOS clipboard/edit context menus for text fields.
- #138 by @pepechka-kun: usage history, measured quota changes, local-log evidence, and explicit attribution uncertainty.
- #139 by @CLOSETTTY: interactive mascots and the Codex mascot creation workflow.
- #140 by @teo-nex: the macOS node-pty file-descriptor leak fix, patch delivery, and resource diagnostics.

Thank you to all six contributors. Each original PR head and its author commits are retained in Git history through separate merge commits. This integration must use a merge commit rather than squash or rebase.

## Maintainer patches

- Fit the minimap overview to the camera viewport and all canvas objects together, with padding; retain stable drag coordinates during a gesture.
- Keep the material handoff icon fixed in the header, remove the count beneath it, and place equally sized Cancel/Send actions at the bottom right of the handoff dialog.
- Split usage history into five left-side sections: conditional estimate, quotas, agents, local-log tokens, and source state. Use pages within sections to fit the window without a long scrolling report.
- Resolve shared App/IPC/preload integrations while retaining the file, handoff, and usage-history flows.
- Retain the approved DEV dependency set and Electron 43.7.7; reuse the matching lockfile with patch-package 8.0.1.

## Scope

#132, #133, #134, #135, and #137 are not included. #136 is also excluded pending the previously requested UI/UX redesign. No commits from that cumulative orchestration series are ancestors of this branch.

Material handoff in #130 does not automatically apply a saved JSON agent report to the material state; this remains the reviewed behavior.

## Validation

- `VITE_BUILD_CHANNEL=DEV npm run build` passed, including the script's TypeScript checks and native-helper build.
- `git diff --check` passed.
- Verified that all six accepted PR heads are ancestors of the integration and all six excluded PR heads are not.
- Verified that the three approved local UI/minimap implementations match the selected DEV copy.
- Added minimap geometry coverage for distant camera positions and adapted usage-history fixtures for section navigation.
- The maintainer manually reviewed the accepted features in the earlier combined DEV build. The final integration without #133 has not received another manual UI pass. Automated tests and macOS/Windows runtime checks were not run locally for this integration.
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.

2 participants