Skip to content

Add Note Board - #7

Open
Mihilih wants to merge 1 commit into
feature/shoppingfrom
feature/notes
Open

Mihilih wants to merge 1 commit into
feature/shoppingfrom
feature/notes

Conversation

@Mihilih

@Mihilih Mihilih commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Overview

Adds the Note Board: posting, editing, deleting, pinning and unpinning notes. It follows the Note Board flows in Figma ("[ACTIVE] full flows"). This PR is stacked on #5 (shopping list) and is already running on the dev server from mvp-features.

Changes Made

Database

  • New Note table and NoteColor enum (YELLOW, ORANGE, BLUE, GREEN, PINK, PURPLE, the post-it colors in the design)
  • Migration 20261111220000_add_notes turns on row-level security for the new table, like the other tables in Supabase. The backend connects as the table owner, so RLS doesn't affect it

New src/notes/ module

  • noteController.ts, noteRouter.ts, notes.schema.ts: routes, logic and request validation

Endpoints (all under /houses/:houseId/notes, members only)

  • GET /: the board. Pinned notes come first (most recently pinned first), then the rest newest first
  • POST /: "Leave a Note" with { body, dueOn?, pinned?, color?, notify? }
  • GET /:noteId: one note
  • PATCH /:noteId: inline edit of the message, due date or color. Author only
  • DELETE /:noteId: the author, or the house owner, can delete
  • POST / DELETE /:noteId/pin: pin and unpin. Any member can do this, and re-pinning moves a note to the top

How it works

  • Notes stay on the board for 14 days after posting, or until their due date if that's later. Pinned notes stay until someone unpins them. A note that's off the board returns 404
  • The design has no color picker, so the server picks the color used least by the house's recent notes, and new notes cycle through all six. The app can still send a color
  • The due date is optional and can't be in the past (in the house's time zone). Sending dueOn: null on PATCH removes it
  • notify (the "Notify Others" switch) is accepted but does nothing until push notifications exist
  • When someone leaves the house, their notes stay, still showing their name
  • No reporting for now

Seed data and docs

  • prisma/seed.ts: six demo notes for The Linden Loft, one pinned and one with a due date
  • docs/API.md: Note Board section
  • docs/roomie.postman_collection.json: a new "5 · Note Board" folder with 10 requests

Test Coverage

test/notes.test.ts (10 tests):

  • Posting with the author, an optional due date and a server-picked color
  • Colors cycle through all six, and a color the app sends is kept
  • Validation: empty or too-long body, unknown color, badly formatted or past due date
  • Board order: pinned notes first, then newest first
  • Notes leave the board after 14 days, unless they're pinned or not due yet, and unpinning an old note removes it
  • Only the author can edit
  • The author or the house owner can delete
  • Any member can pin and unpin, and re-pinning moves a note to the top
  • Notes stay after their author leaves the house
  • Other houses' notes can't be seen or changed

All 61 tests pass, and the full Postman collection passes against a local server.

Next Steps

  • Push notifications for "Notify Others"

Post, edit, delete, pin and unpin notes on the house Note Board, matching the Figma flows. Notes stay for 14 days (or until their due date), pinned notes until unpinned. Adds the Note table and migration (RLS on), seed notes, API docs and Postman requests.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae101605-bddf-466e-b1a2-57272f0a8cf9
Commits

Reviewing files that changed from the base of the PR and between 7e35275 and 51d4edd.

Files selected for processing: 11

  • docs/API.md
  • docs/roomie.postman_collection.json
  • prisma/migrations/20261111220000_add_notes/migration.sql
  • prisma/schema.prisma
  • prisma/seed.ts
  • src/houses/houseRouter.ts
  • src/houses/houseService.ts
  • src/notes/noteController.ts
  • src/notes/noteRouter.ts
  • src/notes/notes.schema.ts
  • test/notes.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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