Skip to content

fix(dev-panel): resolve contact IDs from page metadata, not caller names - #49

Merged
chriskehayias merged 1 commit into
devfrom
fix/dev-panel-resolve-contact-ids-page-metadata
Oct 10, 2026
Merged

chriskehayias merged 1 commit into
devfrom
fix/dev-panel-resolve-contact-ids-page-metadata

Conversation

@chriskehayias

Copy link
Copy Markdown
Contributor

Summary

  • ToolService.resolveContactIds(pageId, recordIds) now looks up Table_Name, Primary_Key and Contact_ID_Field server-side via getPageData, validating them with validateColumnName / validateFkPath before interpolation. Returns null when the page is unknown or has no contact metadata.
  • The dev-panel action resolveContactRecords and ContactRecordsPanel pass params.pageID instead of table/column names, matching what FamilyService.resolveContactIdFromPage's action already does.
  • Hostile-identifier tests (SQL in table name/PK, extra column, alias, non-FK segment) and null/invalid-page tests.
  • Updated reference docs; deleted the closed TODO and updated INDEX.md.

Test plan

  • npm run lint
  • npm run typecheck
  • npm run test:coverage (2095 passed)

🤖 Generated with Claude Code

ToolService.resolveContactIds now takes (pageId, recordIds) and looks up
Table_Name, Primary_Key and Contact_ID_Field server-side via getPageData,
validating them with validateColumnName / validateFkPath before they are
interpolated. The dev-panel action and ContactRecordsPanel pass the page
ID instead of table/column names, so no caller can choose which table
the service account reads. Adds hostile-identifier tests.

Closes the 2026-10-10 dev-panel-resolvecontactids-caller-identifiers TODO.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chriskehayias
chriskehayias merged commit fb0ac59 into dev Oct 10, 2026
1 check passed
@chriskehayias
chriskehayias deleted the fix/dev-panel-resolve-contact-ids-page-metadata branch October 10, 2026 15:45
@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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