Skip to content

Commit f4cde7f

Browse files
authored
Merge pull request #35 from typetorch/claude/hot-asset-diff
assets status --json: a bounded per-asset diff for the Studio plugin
2 parents 4517e3c + e7a9d5c commit f4cde7f

9 files changed

Lines changed: 925 additions & 8 deletions

File tree

‎README.md‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,11 @@ instead if you don't want the devDependency.
545545
**Upload** and **Publish to dev** run `typetorch assets status`, `assets sync` and `assets sync --deploy <dev
546546
branch>` inside `serve` on that export (`--studio-export`; its env file and keys; progress in `serve logs`). Check
547547
needs no key. The dev branch is `dev` (`serve --dev-branch <b>`); a prod-channel branch is refused, and the deploy
548-
follows the approval policy like any other (a proposal when it needs approval).
548+
follows the approval policy like any other (a proposal when it needs approval). While the panel is open the check
549+
also runs by itself every 30 s (skipped while a job runs or nothing is marked; an export equal to the last check's
550+
with the lockfile unchanged never reaches serve), and the card says when it last ran. Each new, changed or removed
551+
asset gets a **Diff** button: the instances added, removed and changed, with old and new property values (see
552+
`assets status --json` under "Hot assets").
549553
- **An agent can always get Studio back.** The plugin long-polls the control API for commands whatever its sync is
550554
doing (down, backing off, waiting for a click, paused), so a broken sync doesn't cut the agent off:
551555
`typetorch studio reconnect` turns auto-connect on, resyncs from scratch and waits to report whether it connected
@@ -628,7 +632,16 @@ versions without a restart (the framework's `hotAsset`). Guide: [Hot assets](htt
628632
`--moderation-timeout` and the key file flags are passed on) when the Assets attribute changes. A prod-channel
629633
branch only takes clean builds, so `--deploy` to one is refused while the sync changes the lockfile: sync, commit,
630634
then deploy.
631-
- **`typetorch assets status`:** export + diff only (`upToDate` in `--json`). **`typetorch assets list`:** the lockfile.
635+
- **`typetorch assets status`:** export + diff only (`upToDate` in `--json`). In `--json`, every change that isn't
636+
`unchanged` carries a `diff` (`src/assetdiff.ts`, what the plugin's Diff button shows): `entries` of instances
637+
`added`, `removed` or `changed` (path inside the asset, class, and for changed ones the properties with their old
638+
and new values, decoded for the common binary types; a chunk of another type that differs is named in
639+
`undecoded`), `before` / `after` summaries (instances, bytes, classes), bounded (30 entries, 8 properties each,
640+
values cut at 48 characters, the rest counted in `more` / `moreProps`). The lockfile holds only a hash, so the
641+
previous version's bytes come from the state dir: every `status` and `sync` keeps a copy of each export in
642+
`.typetorch/hot-assets/<hash>.rbxm` and drops the copies no lockfile entry or export refers to. Without a copy
643+
(synced on another machine, or before 0.12.2) `baseline` is `"none"`, the `note` says so and only the export's
644+
summary is given; the next sync here fills the gap. **`typetorch assets list`:** the lockfile.
632645
- **Lockfile** (`typetorch.assets.lock.json`, keys sorted, one line per asset):
633646

634647
```json

0 commit comments

Comments
 (0)