Skip to content

Networking 6/6: RemoteRoomieRepository - #17

Open
wenja0618 wants to merge 1 commit into
networking-5-notesfrom
networking-6-remote
Open

wenja0618 wants to merge 1 commit into
networking-5-notesfrom
networking-6-remote

Conversation

@wenja0618

Copy link
Copy Markdown
Contributor

Stack 6/7. Builds on #12.

Adds the layer the screens will talk to, on top of the per-feature repositories from #9–#12:

  • RoomieRepository: the interface the UI uses (state, actions, error messages).
  • RemoteRoomieRepository: implements it with the auth, house, chore, note and shopping repositories. Restores the saved sign-in on launch, runs onboarding as a local draft until the house is created, and loads chores a week at a time.
  • RemoteMapping: pure functions from DTOs to the app's models (houses, notes, chore turns, rotations, shopping items).
  • Capabilities: what the backend doesn't support yet (one-time chores, more than one person per week, item notes, "couldn't find it"), so the UI can hide those controls.

Fixes found while wiring it up:

  • Editing a note sends dueOn: null explicitly so the due date can be cleared (RoomieGson.gsonWithNulls).
  • Login returns a house summary, not a full house.
  • Houses and notes carry their colour; notes match the backend's board shape (pinned + notes).
  • KeyedResponseFlow keeps one result per key, used for chore weeks.

Nothing injects RemoteRoomieRepository yet, so the app still runs on demo data after this PR. The next PR switches the screens over.

Test: unit tests pass (new RemoteMappingTest, keyed ResponseFlow tests, a note due-date test). LiveBackendTest runs the whole flow against a real backend when ROOMIE_E2E_URL is set (needs AUTH_DEV_BYPASS=true); it passed against roomie-backend mvp-features.

RoomieRepository is the interface the screens will use. RemoteRoomieRepository
implements it on the auth, house, chore, note and shopping repositories, and
RemoteMapping turns DTOs into the app's models. Nothing injects it yet, so the
app still runs on FakeRoomieRepository.

Also fixes found while wiring it up: note edits send an explicit null to clear a
due date, login returns a house summary, houses and notes carry their colour,
chores load a week at a time (KeyedResponseFlow), and Capabilities records what
the backend doesn't support yet.
@wenja0618
wenja0618 requested a review from caleb-bit November 28, 2026 08:53
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

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: f0707913-a2a4-40e6-b5b0-019c8ff4c5c7
  • 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