feat(feedback): dunite-feedback shared feedback domain crate (DEV-516) #28

Merged
longjacksonle merged 1 commit from feat/DEV-516-dunite-feedback into main 2026-08-03 19:44:37 +02:00

What

Second shared-crate extraction under the DEV-495 epic (DEV-516). Adds dunite-feedback: the feedback models + DTOs and a sqlx-backed FeedbackRepository, lifted from bunyip's superset so a8n-tools and the Bunyip stack share one copy instead of two hand-drifted ones.

Design

  • Framework-agnostic (no actix/axum) and error-agnostic: the repository returns sqlx::Error, which each consumer's ? maps through its own From<sqlx::Error> for AppError (both a8n and dunite-core map RowNotFound -> NotFound identically). The two business not-found cases (delete, archive_one) return a bool so each app raises its own not-found with its own message - the crate never imports a consumer's error type.
  • Taken from bunyip's superset (BUNYIP-411 submitter_ip/user_agent, BUNYIP-92/93 bucket + archive_one) as canonical; a8n's copy was missing those fields.
  • Presentation stays per-app: a8n React AdminFeedbackPage.tsx vs bunyip maud admin.rs.

Tests

10 model unit tests (FeedbackStatus, mask_email, excerpt) come along and pass; clippy -D warnings + fmt clean. The repository's SQL is exercised by the consumers' integration suites.

Consumers

Wired first into bunyip (companion PR - clean re-export, bunyip is the superset). a8n-tools adoption follows as its own PR: it needs a migration to add submitter_ip/user_agent to its feedback table and a reconcile of its list_paginated status-filter to the shared bucket semantics (plus its React admin), so it is deliberately separate.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QLd9c7niucrqx68v4AxVss

## What Second shared-crate extraction under the DEV-495 epic (DEV-516). Adds `dunite-feedback`: the feedback models + DTOs and a sqlx-backed `FeedbackRepository`, lifted from bunyip's superset so a8n-tools and the Bunyip stack share one copy instead of two hand-drifted ones. ## Design - **Framework-agnostic** (no actix/axum) and **error-agnostic**: the repository returns `sqlx::Error`, which each consumer's `?` maps through its own `From<sqlx::Error> for AppError` (both a8n and dunite-core map `RowNotFound -> NotFound` identically). The two business not-found cases (`delete`, `archive_one`) return a `bool` so each app raises its own not-found with its own message - the crate never imports a consumer's error type. - Taken from **bunyip's superset** (BUNYIP-411 `submitter_ip`/`user_agent`, BUNYIP-92/93 bucket + archive_one) as canonical; a8n's copy was missing those fields. - **Presentation stays per-app**: a8n React `AdminFeedbackPage.tsx` vs bunyip maud `admin.rs`. ## Tests 10 model unit tests (FeedbackStatus, mask_email, excerpt) come along and pass; clippy `-D warnings` + fmt clean. The repository's SQL is exercised by the consumers' integration suites. ## Consumers Wired first into bunyip (companion PR - clean re-export, bunyip is the superset). a8n-tools adoption follows as its own PR: it needs a migration to add `submitter_ip`/`user_agent` to its feedback table and a reconcile of its `list_paginated` status-filter to the shared bucket semantics (plus its React admin), so it is deliberately separate. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QLd9c7niucrqx68v4AxVss
feat(feedback): add dunite-feedback shared feedback domain crate (DEV-516)
All checks were successful
Check / fmt + clippy + test (pull_request) Successful in 19s
create-release / create-release (pull_request) Has been skipped
3c9d3f8e57
Second shared-crate extraction under the DEV-495 epic. Lifts the feedback models + DTOs and the sqlx-backed FeedbackRepository from bunyip's superset into a shared crate so a8n-tools and the Bunyip stack share one copy instead of two hand-drifted ones. Framework-agnostic (no actix/axum) and error-agnostic: the repository returns sqlx::Error, which a consumer's `?` maps through its own From<sqlx::Error> for AppError; the two business not-found cases (delete, archive_one) return a bool so each app raises its own error with its own message. Admin presentation (a8n React vs bunyip maud) stays per-app. 10 model unit tests come along; the repository is exercised by the consumers' integration suites.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLd9c7niucrqx68v4AxVss
longjacksonle deleted branch feat/DEV-516-dunite-feedback 2026-08-03 19:44:37 +02:00
Sign in to join this conversation.
No reviewers
No labels
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
psa-systems/dunite!28
No description provided.