Show contact sources in profile sidebar #271

Merged
erik merged 1 commit from feat/task-dcdf6ecd-contact-sources-sidebar into main 2026-07-24 14:28:47 -05:00
Owner

Summary

Show every source associated with a contact in a dedicated card within the public contact detail sidebar.

Task

Task: #task-dcdf6ecd

Changes

  • Add a source query scoped through existing source/contact relationships.
  • Render an accessible, responsive Sources card below the contact profile card.
  • Link each source to its public source detail page in deterministic name order.
  • Show a clear empty state when a contact has no associated sources.
  • Preserve the existing related published-link feed and draft filtering.
  • Regenerate Tailwind CSS for the new component classes.

Testing

  • Unit tests added/updated
  • Populated, multi-source, unrelated-source, and empty states covered
  • Existing published-link rendering and draft exclusion covered
  • Manual testing performed with imported Simon Willison data
  • Desktop and mobile layouts checked without horizontal overflow
  • Dark-theme styles checked in Chromium

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated (not needed; public UI behavior only)
  • No unrelated changes included
## Summary Show every source associated with a contact in a dedicated card within the public contact detail sidebar. ## Task Task: #task-dcdf6ecd ## Changes - Add a source query scoped through existing source/contact relationships. - Render an accessible, responsive Sources card below the contact profile card. - Link each source to its public source detail page in deterministic name order. - Show a clear empty state when a contact has no associated sources. - Preserve the existing related published-link feed and draft filtering. - Regenerate Tailwind CSS for the new component classes. ## Testing - [x] Unit tests added/updated - [x] Populated, multi-source, unrelated-source, and empty states covered - [x] Existing published-link rendering and draft exclusion covered - [x] Manual testing performed with imported Simon Willison data - [x] Desktop and mobile layouts checked without horizontal overflow - [x] Dark-theme styles checked in Chromium ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated (not needed; public UI behavior only) - [x] No unrelated changes included
feat: show contact sources in sidebar
All checks were successful
CI / build-lint-test (pull_request) Successful in 2m4s
c7b10baf68
Task: #task-dcdf6ecd
Author
Owner

Independent review

Summary: The PR correctly loads all sources associated through source_contacts, renders them in a labeled contact-sidebar card with a clear empty state, and preserves the existing published-link feed and draft filtering. The implementation is scoped, readable, and covered by route/rendering tests.

Acceptance criteria

  • Met — A contact detail page lists every associated source. The contact-scoped join returns all matching relationships in deterministic name/ID order; the test covers two associated sources and excludes an unrelated source.
  • Met — Each source displays its name and links to /sources/{id}.
  • Met — Contacts with no associated sources render the clear empty state “No associated sources yet.”
  • Met — Existing contact details and related published links remain intact; regression assertions verify the published link renders and the related draft does not.
  • Met — The existing responsive grid/sticky-sidebar behavior is preserved, with spacing added between cards; the new card and interactive states include light/dark theme classes. The PR also records manual mobile, desktop, and dark-theme checks.
  • Met — Automated route/rendering coverage includes populated and empty source lists, complete multi-source association, unrelated-source exclusion, and existing draft-only content exclusion.

Blocking issues

  • None.

Warnings

  • None.

Verification

  • Full npm test: 59 test files, 476 tests passed.
  • ESLint passed.
  • TypeScript checks passed for all workspaces.
  • Prettier check passed for changed TypeScript/TSX files.
  • Generated CSS contains the new spacing and dark-hover utilities; working tree remained clean.

Verdict: Approved. Ready for the explicit human merge gate.

### Independent review **Summary:** The PR correctly loads all sources associated through `source_contacts`, renders them in a labeled contact-sidebar card with a clear empty state, and preserves the existing published-link feed and draft filtering. The implementation is scoped, readable, and covered by route/rendering tests. #### Acceptance criteria - **Met** — A contact detail page lists every associated source. The contact-scoped join returns all matching relationships in deterministic name/ID order; the test covers two associated sources and excludes an unrelated source. - **Met** — Each source displays its name and links to `/sources/{id}`. - **Met** — Contacts with no associated sources render the clear empty state “No associated sources yet.” - **Met** — Existing contact details and related published links remain intact; regression assertions verify the published link renders and the related draft does not. - **Met** — The existing responsive grid/sticky-sidebar behavior is preserved, with spacing added between cards; the new card and interactive states include light/dark theme classes. The PR also records manual mobile, desktop, and dark-theme checks. - **Met** — Automated route/rendering coverage includes populated and empty source lists, complete multi-source association, unrelated-source exclusion, and existing draft-only content exclusion. #### Blocking issues - None. #### Warnings - None. #### Verification - Full `npm test`: 59 test files, 476 tests passed. - ESLint passed. - TypeScript checks passed for all workspaces. - Prettier check passed for changed TypeScript/TSX files. - Generated CSS contains the new spacing and dark-hover utilities; working tree remained clean. **Verdict: Approved.** Ready for the explicit human merge gate.
erik merged commit 2809b9a559 into main 2026-07-24 14:28:47 -05:00
erik deleted branch feat/task-dcdf6ecd-contact-sources-sidebar 2026-07-24 14:28:47 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit!271
No description provided.