Skip to content

refactor: convert react to the flat module, drop stray files - #436

Merged
retr0h merged 6 commits into
mainfrom
chore/remove-stray-tracked-files
Aug 15, 2026
Merged

refactor: convert react to the flat module, drop stray files#436
retr0h merged 6 commits into
mainfrom
chore/remove-stray-tracked-files

Conversation

@retr0h

@retr0h retr0h commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

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.just was a fetched module forked and committed so
its working-directory pointed at ui/ instead of the repository root. Removing
it 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, so
export JUST_REACT_DIR := "ui" never reached it.

osapi-justfiles#44 converts react to a flat module. The consumer now declares
the path and the module reads it:

react_dir := "ui"          # "." in ui/justfile

import? '.just/remote/react.just'

Nothing to fork, nothing to track, no .gitignore exception. Call sites rename
from react::<name> to react-<name> across the justfiles, both workflows,
CLAUDE.md, and the docs site.

Applies converge-justfile-consumption tasks 1.5 and 2.5.

The stray file

netplanStatus.txt is netplan status --format=json output from someone's
workstation — MAC addresses, IPv6 addresses, flannel and lxd bridges. Nothing
reads it. Removed and ignored so it cannot return.

Note .gitignore already listed .just/remote/*, which is exactly why
react.mod.just stayed tracked: ignore rules do not apply to files already in
the index.

Verified

With no environment variable and no tracked shim:

  • root justfile, react_dir := "ui"just react-fmt-check passes
  • ui/justfile, react_dir := "."just react-fmt-check passes

Merge osapi-justfiles#44 firstfetch pulls react/react.just from
main.

🤖 Generated with Claude Code

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>
retr0h and others added 2 commits August 15, 2026 09:37
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

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bb19e9...0361e61. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

retr0h and others added 3 commits August 15, 2026 09:54
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>
@retr0h retr0h changed the title chore: stop tracking stray files refactor: convert react to the flat module, drop stray files Aug 15, 2026
@retr0h
retr0h merged commit 2560d0d into main Aug 15, 2026
11 checks passed
@retr0h
retr0h deleted the chore/remove-stray-tracked-files branch August 15, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant