Repository navigation
feat(cli): let people apply and diff a board saved as an HTML file - #206
Conversation
apply -f and diff -f read the manifests that Studio's Export HTML embeds. External entities the board references are never written; the command fails if the target lacks one. Signed-off-by: Erik Nilsen <enilsen16@live.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR SummaryLow Risk Overview Board-specific rules:
Reviewed by Cursor Bugbot for commit a212158. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 2aec11e. Configure here.
…ing their specs Signed-off-by: Erik Nilsen <enilsen16@live.com>

Problem
Studio's Export HTML embeds the board's manifests in the saved file (
manifests.modelandmanifests.external). The CLI cannot read them.trogon-atlas apply -fanddiff -faccept only.yamland.ymlfiles.Change
apply -f board.htmlanddiff -f board.htmlread theatlas-snapshotdata block and usemanifests.modelas the manifests. After that, the normal plan and apply path runs..htmlfile only when you name it. A directory walk still reads only YAML, so a saved board next to its YAML is not read twice.fmtdoes not accept.htmlfiles.manifests.external) are foreign entities that the board references directly. The CLI never writes them. If the target does not have one of them,applyanddifffail before they write and list the missing entities.Open question
What must import do with an external entity that already exists in the target? This PR skips it, even if the bundled copy is different. The other options are:
--include-externalflag), and never overwrite the ones that exist.Test
manifest.rs): read a board file that has</script>inside a YAML doc; keep external entities separate; give the error for a file with no manifests or no data block; skip.htmlin a directory walk and infmt.export_integration.rs): export a board, save it as a board file in a new namespace, and apply it. The plan is allCreate, and the next plan is allUnchanged. A board whose external entity is missing in the target is refused, and the error names that entity.cargo test -p trogon-atlas-client,cargo test -p trogon-atlas-cliandcargo clippy -p trogon-atlas-client -p trogon-atlas-cli --all-targets -- -D warningspass.Closes #160
Need help on this PR? Tag
@codesmith-botwith what you need.