Skip to content

feat: add 'tail' note type and unify LabNoteType definitions#25

Merged
AdaInTheLab merged 1 commit intomainfrom
feat/add-tail-type
Apr 16, 2026
Merged

feat: add 'tail' note type and unify LabNoteType definitions#25
AdaInTheLab merged 1 commit intomainfrom
feat/add-tail-type

Conversation

@AdaInTheLab
Copy link
Copy Markdown
Owner

Summary

  • Added "tail" as a new LabNoteType across the entire codebase
  • Consolidated all scattered type definitions into a single source of truth (src/types/labNotes.ts)
  • Fixed pre-existing type drift: "weather" was missing from UpsertBody, and "lore", "weather" were missing from ApiLabNote

What changed

  • src/types/labNotes.ts — Added "tail" to LabNoteType union and ALLOWED_NOTE_TYPES set
  • src/types/UpsertBody.ts — Added "weather" and "tail" to the type field union
  • src/api/data/labNotesStore.ts — Added "lore", "weather", "tail" to ApiLabNote.type
  • src/mappers/labNotesMapper.ts — Removed local duplicate LabNoteType, LabNoteStatus, and ALLOWED_NOTE_TYPES; now imports from types/labNotes.ts. Added "tail" category fallback in deriveType

Why

The mapper had a local copy of the type union that diverged from the canonical definition in types/labNotes.ts. Adding "tail" in one place but not the others caused type inconsistencies. This PR fixes the drift and ensures all four files reference or mirror the same set of allowed types.

Test plan

  • npx tsc --noEmit — clean
  • npm test — 41/41 passing
  • Pre-commit hook passes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@github-actions
Copy link
Copy Markdown

😼 Carmel Judgment Stamp™

🟪 Carmel Judgment Stamp™
😼💬 "Hmm. Acceptable… for now."

PR: #25feat: add 'tail' note type and unify LabNoteType definitions
Author: @AdaInTheLab

This automated judgment has been issued by the Chief Judgment Office (CJO).

@AdaInTheLab AdaInTheLab merged commit cce2b94 into main Apr 16, 2026
2 checks passed
@AdaInTheLab AdaInTheLab deleted the feat/add-tail-type branch April 16, 2026 13:02
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