Skip to content

JMCP: Papers - jmcp/create-a-new-repo-we-ll-use-it-for-findi-UYxpWhUN#9

Closed
landigf wants to merge 1 commit into
mainfrom
jmcp/create-a-new-repo-we-ll-use-it-for-findi-UYxpWhUN
Closed

JMCP: Papers - jmcp/create-a-new-repo-we-ll-use-it-for-findi-UYxpWhUN#9
landigf wants to merge 1 commit into
mainfrom
jmcp/create-a-new-repo-we-ll-use-it-for-findi-UYxpWhUN

Conversation

@landigf

@landigf landigf commented Mar 24, 2026

Copy link
Copy Markdown
Owner

All tests pass, all types check. Here's the review:


Review: Housing Listings Feature

Change summary

Adds a Housing vertical to the Papers web platform — Zürich apartment/sublet listings for researchers relocating July–August 2026.

Layer Files What
Contracts contracts/src/index.ts New HousingListing + HousingListingKind Zod schemas (5 kinds: apartment, shared_flat, studio, sublet, temporary)
DB demo-store.ts, index.ts createHousingListing factory, 5 seed listings, getHousingListings() with availableBy / maxRentChf filters, sorted by rent
Web app/housing/page.tsx, housing-card.tsx, site-header.tsx Server-rendered listing page (hardcoded availableBy: "2026-08-31"), card component, nav link

+177 lines across modified files, ~50 lines in two new files. Clean, follows existing patterns (mirrors Opportunities vertical).

Validation confidence: High

  • npm run test — all 7 tasks pass (cached turbo)
  • npm run check — all 7 tasks pass, no type errors
  • Schema, factory, repository, page, and component all align on the same HousingListing type

Risks / observations

  1. No test coverage for getHousingListings — the availableBy filter compares date strings lexicographically (listing.availableFrom > input.availableBy). This works for ISO dates but there's no test asserting it. The maxRentChf filter is similarly untested.

  2. Hardcoded deadlinepage.tsx passes availableBy: "2026-08-31" as a literal. Once September arrives, listings disappear. Consider making this a query param or computing it from today's date.

  3. No availableUntil filter — a listing ending before the user's move-in (e.g., August-only sublet for someone arriving September) can't be excluded. Low priority for a demo but worth noting.

  4. rooms pluralisation edge casehousing-card.tsx does listing.rooms !== 1 ? "s" : "" but Swiss listings commonly have half-room counts like 2.5. "2.5 rooms" reads fine, but 1.5 also gets "rooms" which is correct English — no bug, just noting it was checked.

  5. Demo-only URLs — all listing URLs point to example.org. Fine for demo; would need scraping/aggregation for real use.

  6. No loading/empty state — if no listings match the filter, the page renders an empty feed-stack div with no user feedback.


Verdict: Clean, well-structured feature that follows established patterns. Ship-ready for demo purposes. The main action item before real use would be adding filter tests and removing the hardcoded date cutoff.

…starting from july, the latest at end of auogust this example is interesting…
@landigf

landigf commented Mar 25, 2026

Copy link
Copy Markdown
Owner Author

Closing: will integrate valuable features directly on main to avoid cascade merge conflicts.

@landigf landigf closed this Mar 25, 2026
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