Skip to content

fix: stop ignoring tracked source and docs directories - #40

Open
rodrigottv wants to merge 1 commit into
renatoasse:masterfrom
rodrigottv:fix/gitignore-tracked-dirs
Open

fix: stop ignoring tracked source and docs directories#40
rodrigottv wants to merge 1 commit into
renatoasse:masterfrom
rodrigottv:fix/gitignore-tracked-dirs

Conversation

@rodrigottv

Copy link
Copy Markdown

Follow-up to #39, where I hit this while committing and flagged it as out of scope.

The problem

Several .gitignore rules cover directories whose contents are tracked. Git keeps tracked files working, so nothing looks broken — but a new file in those directories is silently skipped by git add, with no error and no warning.

Rule Tracked files under it
tests/ 7
docs/ 48
temp/ 56
test-results/ 28
squads/*/ 11
.claude/settings.local.json 1

What this changes

Removed tests/ — the 7 test files are tracked and CI runs npm test over tests/*.test.js. A new test file would pass locally and never reach the repository, so the suite would silently stop growing. This rule came from 7c6c370 ("update ignore patterns"), which over-reached.

Removed docs/ — ignored since the initial commit, yet 48 design docs are tracked and new ones are still being added (8be326c, 85c74fa, 07e78cc). The rule has been worked around rather than honoured, and CLAUDE.md points readers here.

Fixed a typodashboards/test-results/ (plural) matched nothing; the directory is dashboard/ (singular), so the real path was never covered.

Removed temp/squads/ — redundant with temp/.

What this deliberately leaves alone

temp/, test-results/ and dashboard/test-results/ stay ignored. They are scratch and build-artifact directories, where silently skipping new files is the behaviour you want. Their already-tracked contents are unaffected either way.

squads/*/ stays — ignoring user-created squads is correct; the tracked state.json dashboard fixtures predate the rule and keep working.

Verification

Probed a new file in each directory:

tests/                   visible  (git add works)
docs/                    visible  (git add works)
temp/                    IGNORED (new files invisible)
test-results/            IGNORED (new files invisible)
dashboard/test-results/  IGNORED (new files invisible)

No previously-hidden files appear in git status as a result, so this exposes nothing unintended.

One thing I did not touch

.claude/settings.local.json is both ignored and tracked — the inverse of the above. Because it is tracked, every contributor's local permission edits show up as repository modifications (this happened to me while working on #39). The clean fix is git rm --cached, but that removes the file for everyone and contributors would lose whatever shared permission baseline it provides. That is your call, not mine, so I left it.

🤖 Generated with Claude Code

Several .gitignore rules covered directories whose contents are tracked.
Git keeps tracked files working, so nothing was visibly broken — but a NEW
file in those directories is silently skipped by `git add`, with no error.

- `tests/` — the 7 test files are tracked and CI runs `npm test` over them,
  so a new test file would pass locally and never reach the repository.
  Added by 7c6c370 ("update ignore patterns"), which over-reached.
- `docs/` — ignored since the initial commit, yet 48 design docs are tracked
  and new ones are still being committed (8be326c, 85c74fa, 07e78cc), so the
  rule has been worked around rather than honoured. CLAUDE.md points here.

Also:
- `dashboards/test-results/` was a typo — the directory is `dashboard/`
  (singular), so the rule matched nothing while the real path went uncovered.
- `temp/squads/` was redundant with `temp/`.

`temp/`, `test-results/` and `dashboard/test-results/` stay ignored: they are
scratch and build-artifact directories, where silently skipping new files is
the desired behaviour. Their already-tracked contents are unaffected.

Verified by probing a new file in each directory: tests/ and docs/ now accept
one, the artifact directories still reject it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant