feat(research): B2B customer discovery docs + fix CI/TS errors#37
Conversation
…em products - Add interview templates for Freelii, Gearup, Reyts, Juntta, Skyhitz - Fix TS error: export Dispute type from blockchain/types.ts - Fix TS error: add useSubmitEvidence to BlockchainHooks interface - Fix TS error: explicit type annotation on DisputeCard voters.find callback Closes sliceprotocol#24
📝 WalkthroughWalkthroughFive customer-discovery interview research documents are added for Stellar ecosystem products (Freelii, Gearup, Juntta, Reyts, Skyhitz), each following a standard template with contact metadata, dispute-fit analysis, Q&A placeholders, and synthesis. Separately, ChangesCustomer Discovery Interview Documents
Dispute Type Contracts and Hook Interface
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/blockchain/types.tsOops! Something went wrong! :( ESLint: 9.39.2 TypeError: Converting circular structure to JSON ... [truncated 453 characters] ... c/dist/eslintrc.cjs:3261:25) src/components/disputes/DisputeCard.tsxOops! Something went wrong! :( ESLint: 9.39.2 TypeError: Converting circular structure to JSON ... [truncated 453 characters] ... c/dist/eslintrc.cjs:3261:25) 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/blockchain/types.ts`:
- Around line 72-103: Replace the newly introduced `Dispute` interface with
`DisputeUI` to comply with the project's standardized frontend contract. Either
rename the `Dispute` interface definition to `DisputeUI` or remove `Dispute` if
`DisputeUI` already exists with compatible properties. Then update all frontend
files that reference or duplicate dispute type definitions to import and use
`DisputeUI` from `src/blockchain/types.ts`, removing any locally defined dispute
interfaces to maintain consistency and prevent type drift across the codebase.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 986af128-6b73-419d-a0dd-44736dd5a699
📒 Files selected for processing (7)
docs/research/interviews/Freelii.mddocs/research/interviews/Gearup.mddocs/research/interviews/Juntta.mddocs/research/interviews/Reyts.mddocs/research/interviews/Skyhitz.mdsrc/blockchain/types.tssrc/components/disputes/DisputeCard.tsx
| /** | ||
| * Full dispute representation used by the frontend | ||
| */ | ||
| export interface Dispute { | ||
| id: string | bigint; | ||
| title: string; | ||
| category: string; | ||
| status: number | string; | ||
| phase?: string; | ||
| deadlineLabel?: string; | ||
| isUrgent?: boolean; | ||
| stake?: string; | ||
| description?: string; | ||
| claimer: string; | ||
| defender: string; | ||
| claimerName?: string; | ||
| defenderName?: string; | ||
| claimerDescription?: string; | ||
| defenderDescription?: string; | ||
| claimerCarouselEvidence?: string[]; | ||
| defenderCarouselEvidence?: string[]; | ||
| claimerAudioEvidence?: string; | ||
| defenderAudioEvidence?: string; | ||
| evidence?: string[]; | ||
| jurorsRequired?: number; | ||
| revealDeadline?: number; | ||
| evidenceDeadline?: number; | ||
| claimerPaid?: boolean; | ||
| defenderPaid?: boolean; | ||
| ruling?: number; | ||
| } | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win
Standardize on DisputeUI as the shared frontend contract.
This introduces Dispute as the frontend dispute type, but project rules require DisputeUI for frontend dispute representations. It also increases drift risk with duplicated dispute shapes in UI files.
Suggested direction
-export interface Dispute {
+export interface DisputeUI {
id: string | bigint;
title: string;
category: string;
status: number | string;
...
}Then update frontend consumers to import DisputeUI from src/blockchain/types.ts and remove local duplicated dispute interfaces.
As per coding guidelines, "Use DisputeUI interface for all frontend dispute representations."
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /** | |
| * Full dispute representation used by the frontend | |
| */ | |
| export interface Dispute { | |
| id: string | bigint; | |
| title: string; | |
| category: string; | |
| status: number | string; | |
| phase?: string; | |
| deadlineLabel?: string; | |
| isUrgent?: boolean; | |
| stake?: string; | |
| description?: string; | |
| claimer: string; | |
| defender: string; | |
| claimerName?: string; | |
| defenderName?: string; | |
| claimerDescription?: string; | |
| defenderDescription?: string; | |
| claimerCarouselEvidence?: string[]; | |
| defenderCarouselEvidence?: string[]; | |
| claimerAudioEvidence?: string; | |
| defenderAudioEvidence?: string; | |
| evidence?: string[]; | |
| jurorsRequired?: number; | |
| revealDeadline?: number; | |
| evidenceDeadline?: number; | |
| claimerPaid?: boolean; | |
| defenderPaid?: boolean; | |
| ruling?: number; | |
| } | |
| /** | |
| * Full dispute representation used by the frontend | |
| */ | |
| export interface DisputeUI { | |
| id: string | bigint; | |
| title: string; | |
| category: string; | |
| status: number | string; | |
| phase?: string; | |
| deadlineLabel?: string; | |
| isUrgent?: boolean; | |
| stake?: string; | |
| description?: string; | |
| claimer: string; | |
| defender: string; | |
| claimerName?: string; | |
| defenderName?: string; | |
| claimerDescription?: string; | |
| defenderDescription?: string; | |
| claimerCarouselEvidence?: string[]; | |
| defenderCarouselEvidence?: string[]; | |
| claimerAudioEvidence?: string; | |
| defenderAudioEvidence?: string; | |
| evidence?: string[]; | |
| jurorsRequired?: number; | |
| revealDeadline?: number; | |
| evidenceDeadline?: number; | |
| claimerPaid?: boolean; | |
| defenderPaid?: boolean; | |
| ruling?: number; | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/blockchain/types.ts` around lines 72 - 103, Replace the newly introduced
`Dispute` interface with `DisputeUI` to comply with the project's standardized
frontend contract. Either rename the `Dispute` interface definition to
`DisputeUI` or remove `Dispute` if `DisputeUI` already exists with compatible
properties. Then update all frontend files that reference or duplicate dispute
type definitions to import and use `DisputeUI` from `src/blockchain/types.ts`,
removing any locally defined dispute interfaces to maintain consistency and
prevent type drift across the codebase.
Source: Coding guidelines
|
Closing as duplicate of #35 which already covers this work. |
📝 Summary
Closes #24 — [Product Discovery] Customer Discovery B2B — 5 Stellar Ecosystem Products
This PR delivers two things:
🔄 Changes Made
Research Documents (docs/research/interviews/)
Added one document per target product using the standard interview template from
research/template.md:Each document includes: product description, why it's a Slice candidate, discovery questions, synthesis section, and suggested next steps — ready to be filled in after the actual interview.
TypeScript / CI Fixes (src/)
Fixed 5 type errors that were causing
pnpm run lint(tsc + eslint) to fail with exit code 2:src/blockchain/types.ts— AddedDisputeinterface (full frontend shape with all fields used across components) anduseSubmitEvidence?toBlockchainHookssrc/components/disputes/DisputeCard.tsx— Explicit type annotation onvoters.findcallback parameter to fix implicitanyerror🧪 Testing
All 5 TypeScript errors resolved. The 9 remaining items are pre-existing warnings (unused imports, setState-in-effect) that were already present before this PR.
✅ Testing Checklist
tscexits 0)Disputetype covers all fields used across 9+ filesDisputetype is intentionally broad (all optional fields except core identifiers). Components already handle missing fields gracefully via optional chaining.🚀 Next Steps & Improvements
docs/research/customer-discovery-summary.mdafter 5+ interviews are completeSummary by CodeRabbit
Documentation
New Features