refactor: convert react to the flat module, drop stray files - #436
Merged
Conversation
netplanStatus.txt is `netplan status` output redirected to a file and committed. It contains this machine's MAC addresses, a routable global IPv6 address, LAN subnets, and the local k3s, flannel, CNI, and LXD bridge topology. .just/remote/react.mod.just is a fetched copy of a shared justfile. The justfiles specification says fetched files are excluded from version control, and every other repository ignores .just/ entirely. This one committed the file before the ignore rule existed, so the rule never applied — gitignore only suppresses untracked files. Broaden the ignore from .just/remote/* to .just/, and add netplanStatus.txt so a stray redirect does not land again. This removes both from the working tree, not from history. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Untracking .just/remote/react.mod.just broke the build: fetch retrieved react.just but never react.mod.just, which is why that file was committed in the first place. Adds the missing curl so the module is provisioned like every other one, rather than depending on a copy in git. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Untracking .just/remote/react.mod.just was wrong. The file is a deliberate override, and says so: upstream sets working-directory to the repository root, but osapi's React app lives in ui/, so the local copy points at ../../ui. Fetching upstream's copy instead broke `just react::deps` -- bun looked for package.json at the repository root, where there is none. Restores the file and narrows .gitignore to ignore fetched modules except this one, so the exception is visible rather than implied. netplanStatus.txt, which is host data nothing reads, stays removed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #436 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 484 484
Lines 24935 24935
=======================================
Hits 24921 24921
Misses 14 14 Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
netplanStatus.txt is `netplan status --format=json` output from someone's workstation -- MAC addresses, IPv6, flannel and lxd bridges. Nothing reads it. Removed and ignored so it cannot return. .just/remote/react.mod.just was a fetched module forked to point at ui/. The shared react module now takes that path as JUST_REACT_DIR (osapi-justfiles#43), so the fork is unnecessary: the file is untracked, fetch retrieves it like every other module, and the directory is declared here. .gitignore already listed .just/remote/*, which is why the file stayed tracked -- ignore rules do not apply to files already in the index. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both branches declared a variable at the top of the justfile -- JUST_COVERAGE_TARGET from the coverage gate, JUST_REACT_DIR from the react module change. Kept both. Verified after merge: fetch retrieves upstream's unmodified react shim and `just react::fmt-check` runs against ui/. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Renames react::<name> call sites to react-<name>, imports react/react.just instead of loading react.mod.just, and declares react_dir in each consuming justfile -- "ui" at the root, "." in ui/justfile. This is what removes .just/remote/react.mod.just from tracking. The file was a fork of a fetched module carrying one per-repository value; with the module flat, the value is declared by the consumer and there is nothing to fork. Depends on osapi-justfiles#44. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Two changes, linked: the stray tracked file could not be removed until the
react module stopped requiring a fork.
The react module conversion
.just/remote/react.mod.justwas a fetched module forked and committed soits
working-directorypointed atui/instead of the repository root. Removingit broke the build; making the path an env var did not help either, because
env()resolves against the process environment when just parses the module, soexport JUST_REACT_DIR := "ui"never reached it.osapi-justfiles#44 converts
reactto a flat module. The consumer now declaresthe path and the module reads it:
Nothing to fork, nothing to track, no
.gitignoreexception. Call sites renamefrom
react::<name>toreact-<name>across the justfiles, both workflows,CLAUDE.md, and the docs site.Applies
converge-justfile-consumptiontasks 1.5 and 2.5.The stray file
netplanStatus.txtisnetplan status --format=jsonoutput from someone'sworkstation — MAC addresses, IPv6 addresses, flannel and lxd bridges. Nothing
reads it. Removed and ignored so it cannot return.
Note
.gitignorealready listed.just/remote/*, which is exactly whyreact.mod.juststayed tracked: ignore rules do not apply to files already inthe index.
Verified
With no environment variable and no tracked shim:
react_dir := "ui"→just react-fmt-checkpassesui/justfile,react_dir := "."→just react-fmt-checkpassesMerge osapi-justfiles#44 first —
fetchpullsreact/react.justfrommain.🤖 Generated with Claude Code