Skip to content

Commit fec14e4

Browse files
committed
update claudefile to always check linter and types before marking things as done, also hide the 'hide' toggle if no collectables are marked as collected
1 parent 8233dfc commit fec14e4

2 files changed

Lines changed: 34 additions & 13 deletions

File tree

CLAUDE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,25 @@ Savegame files (`.sav`) are parsed using `@etothepii/satisfactory-file-parser` i
149149

150150
## Code Conventions
151151

152+
### Definition of Done (for agents and humans)
153+
154+
Before declaring any code change complete (and before reporting "done" to the user), run **both** of these on the touched files / project:
155+
156+
```bash
157+
npm run lint # Biome (formatting + linting)
158+
npm run check-types # tsc --noEmit
159+
```
160+
161+
If either fails:
162+
163+
1. Fix the issues (use `npm run format` or `npx biome check --write <files>` for autofixable formatting).
164+
2. Re-run both commands until clean.
165+
3. Only then summarise the change to the user.
166+
167+
For a focused check on just the files you touched, scope biome explicitly: `npx biome check --write <paths…>`. Do **not** rely solely on a focused check — a final `npm run lint && npm run check-types` is the contract.
168+
169+
If tests cover the touched area, also run `npm test -- --run`.
170+
152171
### Writing Style
153172

154173
- **Do not use em dashes (``)** in code comments, UI copy, notification messages, commit messages, or any text that ships to users. Prefer commas, parentheses, colons, or separate sentences. Applies to both source code and generated text.

src/map/MapFiltersPanel.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -493,19 +493,21 @@ export function MapFiltersPanel({ gameId }: MapFiltersPanelProps) {
493493
</Button>
494494
) : null}
495495
</Group>
496-
<Switch
497-
size="xs"
498-
checked={hideCollectedCollectibles}
499-
onChange={event =>
500-
setHideCollectedCollectibles(event.currentTarget.checked)
501-
}
502-
aria-label="Hide collected collectibles on the map"
503-
label="Hide"
504-
labelPosition="left"
505-
styles={{
506-
label: { fontSize: 11, color: 'var(--mantine-color-dimmed)' },
507-
}}
508-
/>
496+
{totalCollected > 0 ? (
497+
<Switch
498+
size="xs"
499+
checked={hideCollectedCollectibles}
500+
onChange={event =>
501+
setHideCollectedCollectibles(event.currentTarget.checked)
502+
}
503+
aria-label="Hide collected collectibles on the map"
504+
label="Hide"
505+
labelPosition="left"
506+
styles={{
507+
label: { fontSize: 11, color: 'var(--mantine-color-dimmed)' },
508+
}}
509+
/>
510+
) : null}
509511
</Group>
510512

511513
<Stack gap={3}>

0 commit comments

Comments
 (0)