Skip to content

Conversation

@andybraren
Copy link
Collaborator

@andybraren andybraren commented Jan 14, 2026

Implementation of a basic user feedback mechanism for messages using Langfuse's Scores API.

This adds thumbs up/down buttons below messages from agents and a modal for the user to provide more details before submitting their feedback.

The project, session ID, username, and selected workflow get stored in the Metadata field, and the user's comment and selected chat message get stored in the Comment field. If the user selects "Include all messages" the full transcript is included in the Comment field as well.

Future enhancements

  • "Include all messages" should probably be "Include all previous messages" leading up to the one that the user is providing feedback on, but I hit some weird issues. Can try again in a follow-up.

Screenshots

2026-01-14 11 13 14 2026-01-16 03 07 27 2026-01-16 03 27 07 2026-01-16 03 17 03 2026-01-16 03 20 35

@andybraren andybraren marked this pull request as draft January 14, 2026 16:13
@github-actions

This comment has been minimized.

- Introduced a new langfuseClient module to encapsulate LangfuseWeb client initialization using only the public key.
- Updated the feedback route to build context from the session and send feedback directly to Langfuse using the new SDK, eliminating the need for secret keys.
- Simplified the feedback submission process by removing unnecessary payload preparation and API call logic.

This change enhances security and simplifies the feedback submission process.
- Updated button and checkbox components to include a cursor pointer style for better user interaction feedback.
- This change improves the overall usability and accessibility of the UI elements.
- Enhanced FeedbackButtons to include cursor pointer style for better interaction.
- Simplified FeedbackModal by removing unnecessary fragments and updating text for clarity.
- Adjusted placeholder text and button labels for a more intuitive user experience.

These changes aim to improve usability and accessibility in the feedback submission process.
- Replaced the AlertTriangle icon with Info for a clearer privacy indication.
- Updated the label from "Include full transcript" to "Include previous messages" for better understanding.
- Simplified the privacy disclaimer text to clarify how feedback and messages will be stored.

These changes aim to improve user comprehension and enhance the overall feedback experience.
- Updated the feedback comment construction to focus on user-provided content.
- Introduced a metadata object to encapsulate structured session information (project, session, user).
- Simplified the feedback submission process by adjusting how comments and metadata are sent to the LangfuseWeb SDK.

These changes enhance the clarity and organization of feedback data being sent, improving overall feedback management.
- Added an optional 'workflow' field to the feedback API request type for improved context.
- Updated the feedback submission process to include the workflow in the metadata sent to Langfuse.
- Modified the FeedbackModal to conditionally include the active workflow in the feedback context.

These changes aim to provide better tracking of user feedback related to specific workflows, enhancing the overall feedback management experience.
…ckModal for improved clarity and completeness.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Claude Code Review

Summary

This PR implements a user feedback mechanism with thumbs up/down buttons on agent messages, allowing users to provide feedback that gets sent to Langfuse. The implementation is clean and follows most frontend patterns, but there are several critical security and privacy issues that must be addressed before merge, plus some architectural concerns.

Issues by Severity

🚫 Blocker Issues

1. CRITICAL: Message Content Privacy Violation

  • Location: components/frontend/src/app/api/feedback/route.ts:80-88
  • Issue: Full message transcript is sent to Langfuse when includeTranscript is checked, potentially exposing sensitive user data, code, API keys, or proprietary information
  • Problem: This violates the platform's privacy-first design documented in CLAUDE.md:342-346 which states "User messages and assistant responses are REDACTED in traces"
  • Impact: Users may unknowingly share sensitive information to Langfuse
  • Fix Required:
    • Either remove the includeTranscript option entirely
    • OR implement content masking/redaction similar to the backend runner's privacy masking
    • OR add very prominent warnings about what will be shared

2. CRITICAL: Missing Secret Key in Langfuse Client

  • Location: components/frontend/src/lib/langfuseClient.ts:27-30
  • Issue: Using LangfuseWeb with only public key - this may not work for server-side score submissions
  • Context: The Langfuse SDK documentation typically requires secret key for server-side operations
  • Verification Needed: Test if scores actually get recorded with this configuration
  • Risk: Feedback silently fails to record, giving users false confidence their feedback was submitted

3. CRITICAL: No Authentication/Authorization on Feedback API

  • Location: components/frontend/src/app/api/feedback/route.ts:37
  • Issue: The /api/feedback route has NO authentication check - anyone can submit arbitrary feedback
  • Attack Vector: Malicious actors could spam the feedback system, pollute Langfuse data, or submit false feedback
  • Fix Required: Add authentication middleware to verify the request comes from an authenticated user
  • Example Fix:
// Add authentication check
const session = await getServerSession(); // or your auth method
if (!session) {
  return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
}

🔴 Critical Issues

4. Type Safety Violation - any Type

  • Location: components/frontend/src/components/ui/message.tsx:174 (implicit in truncated diff)
  • Rule Violated: Frontend Critical Rule Outcome: Reduce Refinement Time with agent System #1 - Zero any types
  • Fix: Review the full message.tsx changes for any any types and replace with proper types

5. Missing Error Handling in Feedback Submission

  • Location: components/frontend/src/app/api/feedback/route.ts:121-128
  • Issue: Generic error handling doesn't distinguish between different failure modes
  • Problem: User gets "Internal server error" whether it's a validation error, Langfuse error, or network issue
  • Fix: Add specific error handling:
} catch (error) {
  console.error('Error submitting feedback:', error);
  
  if (error instanceof LangfuseError) {
    return NextResponse.json(
      { error: 'Failed to record feedback', details: error.message },
      { status: 502 }
    );
  }
  
  return NextResponse.json(
    { error: 'Internal server error' },
    { status: 500 }
  );
}

6. Missing useCurrentUser Query Definition

  • Location: components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx:192
  • Issue: useCurrentUser is imported from @/services/queries but not defined in the PR diff
  • Risk: Build may fail, or this may be using an undefined hook
  • Fix Required: Verify this hook exists or add it to the PR

🟡 Major Issues

7. FeedbackContext Performance Concern

  • Location: components/frontend/src/contexts/FeedbackContext.tsx:40-51
  • Issue: messages array in dependencies will cause re-renders on every message update
  • Performance Impact: In long sessions with many messages, this could cause unnecessary re-renders of all feedback buttons
  • Fix: Consider using a ref for messages or memoizing differently:
const messagesRef = useRef(messages);
useEffect(() => {
  messagesRef.current = messages;
}, [messages]);

8. Environment Variables Not Validated

  • Location: components/manifests/base/frontend-deployment.yaml:additions
  • Issue: PR adds Langfuse env vars to deployment but doesn't show validation that they're set
  • Risk: Silent failure if env vars are missing in production
  • Fix: Add startup validation or better logging when Langfuse is not configured

9. Missing Loading States in FeedbackButtons

  • Location: components/frontend/src/components/feedback/FeedbackButtons.tsx:37-45
  • Issue: No loading state while modal is submitting, user can click button again
  • Frontend Rule Violated: "All buttons have loading states"
  • Fix: Disable buttons or show loading indicator while feedbackModalOpen is true

10. No Success Toast/Notification

  • Location: components/frontend/src/components/feedback/FeedbackModal.tsx:117-121
  • Issue: After successful submission, modal just closes - no user confirmation
  • UX Problem: Users may not know if their feedback was actually submitted
  • Fix: Add a toast notification on success

🔵 Minor Issues

11. Inconsistent Error Message Formatting

  • Location: components/frontend/src/app/api/feedback/route.ts:125
  • Issue: Error responses don't follow a consistent structure with the success response
  • Suggestion: Use consistent { success: false, error: string } format

12. Unused messageTimestamp Parameter

  • Location: Multiple files
  • Issue: messageTimestamp is passed around but never actually used
  • Fix: Either use it (add to metadata) or remove it

13. Magic Numbers in Code

  • Location: components/frontend/src/app/api/feedback/route.ts:94
  • Issue: Date.now() for fallback traceId is not deterministic
  • Better Approach: Use a more predictable ID format or UUID

14. Missing JSDoc Comments

  • Location: components/frontend/src/contexts/FeedbackContext.tsx
  • Issue: Public API (FeedbackProvider, hooks) lacks documentation
  • Fix: Add JSDoc comments explaining usage

15. Cursor CSS Rule Duplication

  • Location: components/frontend/src/components/ui/button.tsx:10, checkbox.tsx:16
  • Issue: Adding cursor-pointer to base styles affects ALL buttons/checkboxes globally
  • Risk: May break disabled state styling where cursor-not-allowed should show
  • Fix: Verify this doesn't break disabled states, or use more specific selectors

Positive Highlights

Excellent UX Design: The inline feedback buttons with visual confirmation (check mark) are intuitive and non-intrusive

Good Use of Shadcn Components: Properly uses Dialog, Button, Textarea, Checkbox from the UI library

Privacy Notice: Good job including the privacy disclaimer in the modal

Context Provider Pattern: Clean separation of concerns with FeedbackContext

Graceful Degradation: Components check for context availability and render nothing if unavailable

Type Safety (mostly): Good use of TypeScript types for FeedbackRequest, FeedbackType, etc.

Recommendations

Priority 1 (Must Fix Before Merge)

  1. Add authentication to /api/feedback route - This is a security vulnerability
  2. Remove or redact transcript feature - Privacy violation that contradicts documented platform standards
  3. Verify Langfuse client configuration - Test that scores actually get recorded with public key only
  4. Add LANGFUSE_SECRET_KEY if needed - May be required for server-side score submission

Priority 2 (Should Fix Before Merge)

  1. Add success notification after feedback submission
  2. Fix performance issue with FeedbackContext re-renders
  3. Verify useCurrentUser exists or add it to the PR
  4. Add loading states to feedback buttons during submission

Priority 3 (Nice to Have)

  1. Add better error handling with specific error messages
  2. Remove unused parameters like messageTimestamp
  3. Add documentation to public APIs
  4. Test cursor CSS changes don't break disabled states

Testing Recommendations

Before merge, manually test:

  • Feedback submission with Langfuse configured
  • Feedback submission WITHOUT Langfuse (graceful degradation)
  • Feedback with transcript enabled (verify what actually gets sent)
  • Feedback buttons on multiple messages in same session
  • Feedback modal cancel/close behavior
  • Network errors during submission
  • Unauthenticated access to /api/feedback endpoint (should fail)

References

  • Privacy Standards: CLAUDE.md lines 342-346 (Langfuse privacy-first design)
  • Frontend Rules: CLAUDE.md lines 1113-1135 (zero any, loading states, etc.)
  • Security Standards: .claude/context/security-standards.md

Overall Assessment: This is a well-designed feature with good UX, but has critical security and privacy issues that must be fixed before merge. The transcript feature in particular needs serious reconsideration given the platform's privacy-first approach to Langfuse integration.


🔍 View AI decision process (logs available for 90 days)

📋 View memory system files loaded (click to expand)

What Amber Loaded for Code Review

Amber automatically loaded these repository standards from the memory system:

  1. CLAUDE.md - Master project instructions, development standards
  2. backend-development.md - Go backend, K8s integration patterns
  3. frontend-development.md - NextJS, Shadcn UI, React Query patterns
  4. security-standards.md - Auth, RBAC, token handling
  5. k8s-client-usage.md - User token vs service account patterns
  6. error-handling.md - Consistent error patterns
  7. react-query-usage.md - Data fetching patterns

Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs #359, #360) - not just generic code review guidelines.

…enhance security and simplify environment variable management.
…streamline environment variable configuration.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Claude Code Review

Summary

This PR implements a user feedback mechanism for messages in the platform, allowing users to provide thumbs up/down feedback on agent responses with optional comments and full transcript inclusion. The implementation integrates with Langfuse for feedback collection.

Overall Assessment: This is a well-structured implementation with good UX design and privacy considerations. However, there are several critical security and architecture issues that must be addressed before merging.


Issues by Severity

🚫 Blocker Issues

1. Secret Key Exposure in Frontend Deployment (components/manifests/overlays/local-dev/frontend-patch.yaml:41-46)

  • Issue: The LANGFUSE_SECRET_KEY is being injected into the frontend container environment variables
  • Security Risk: Secret keys should NEVER be exposed to the frontend. Even though it's marked as optional: true, this creates a security vulnerability if the secret exists
  • Why Critical: The frontend is a client-side application. Any environment variables (even server-side in Next.js) can potentially be exposed through various attack vectors (SSR leaks, build artifacts, etc.)
  • Fix Required: Remove LANGFUSE_SECRET_KEY from frontend deployment completely. The API route should use server-side only env vars
  • Reference: Per security standards (CLAUDE.md:435-439), never expose secrets in logs or client-accessible contexts

2. Missing Secret Key Protection in API Route (components/frontend/src/lib/langfuseClient.ts:19-24)

  • Issue: The code references process.env.LANGFUSE_SECRET_KEY in the client initialization (though not currently used by LangfuseWeb)
  • Security Risk: If someone updates this code to use the secret key, it would be accessible server-side but shouldn't be in frontend code at all
  • Fix Required: Add explicit comment that SECRET_KEY should never be used in frontend code, or move to backend API
  • Pattern Violation: Violates token security standards (CLAUDE.md:435-439)

3. No Error Handling for Langfuse SDK Failures (components/frontend/src/app/api/feedback/route.ts:108-114)

  • Issue: langfuse.score() is called without error handling (no try-catch around the SDK call itself)
  • Risk: If Langfuse SDK throws an exception, the API returns 500 but user gets generic error
  • Impact: Silent failures in feedback submission, poor UX
  • Fix Required: Wrap langfuse.score() in try-catch with specific error handling
  • Pattern Violation: Error handling pattern (error-handling.md:26-40) requires logging with context

🔴 Critical Issues

4. Type Safety Violation - Any Type Usage (components/frontend/src/components/feedback/FeedbackModal.tsx:95-110)

  • Issue: Manual fetch() call instead of using React Query patterns
  • Pattern Violation: Frontend standards (frontend-development.md:56-70) require ALL data operations use React Query
  • Fix Required: Create a useFeedbackMutation hook in src/services/queries/feedback.ts following the mutation pattern
  • Reference: react-query-usage.md:100-162 for mutation pattern
  • Impact: No caching, no automatic error retry, inconsistent with codebase patterns

5. Missing Authentication/Authorization (components/frontend/src/app/api/feedback/route.ts:37-60)

  • Issue: No validation of user identity or authorization to submit feedback for this session
  • Security Risk: Any user could submit feedback for any session/project they don't have access to
  • Fix Required:
    • Add authentication check (verify bearer token or session cookie)
    • Validate user has access to the specified project/session
    • Compare username from request with authenticated user
  • Pattern: Should follow backend auth patterns (security-standards.md:9-18, k8s-client-usage.md:9-18)

6. Potential PII/Sensitive Data Exposure (components/frontend/src/app/api/feedback/route.ts:84-88)

  • Issue: Full transcript is sent to Langfuse without any sanitization or truncation
  • Privacy Risk: May include sensitive information (API keys, passwords, personal data) from user messages
  • CLAUDE.md Violation: Langfuse documentation (CLAUDE.md:390-402) emphasizes privacy-first design with masking by default
  • Fix Required:
    • Add warning in UI that sensitive data should not be included
    • Consider truncating very long transcripts
    • Add option to exclude specific messages
    • Document in privacy notice what data is collected

7. No Request Rate Limiting (components/frontend/src/app/api/feedback/route.ts)

  • Issue: No rate limiting on feedback submission
  • Risk: Abuse vector - users could spam feedback submissions
  • Fix Required: Add rate limiting middleware (by IP or user)
  • Recommendation: Limit to 10 feedback submissions per minute per user

🟡 Major Issues

8. Message State Not Persisted (components/frontend/src/components/feedback/FeedbackButtons.tsx:28)

  • Issue: submittedFeedback state is local component state, not persisted
  • UX Impact: If user refreshes page, feedback state is lost and buttons reset
  • Fix Required: Either:
    • Store submitted feedback in localStorage with message ID
    • Fetch feedback status from backend on component mount
    • Show submitted state based on Langfuse data

9. Inconsistent Type Definitions (components/frontend/src/app/api/feedback/route.ts:24-35)

  • Issue: Type definition duplicates parts of FeedbackContextValue
  • Maintainability: Changes to context require updating API route types
  • Fix Required: Import and reuse types from FeedbackContext or create shared types file
  • Pattern Violation: Frontend standards (frontend-development.md:74-78) prefer type over interface, but also recommend DRY principle

10. Missing Loading States (components/frontend/src/components/feedback/FeedbackButtons.tsx:61-82)

  • Issue: No loading indicator while feedback is being submitted
  • UX Impact: User doesn't know if click was registered
  • Fix Required: Show subtle loading spinner or disable buttons during submission
  • Pattern: Frontend checklist (CLAUDE.md:1130) requires all buttons have loading states

11. Error State Not Cleared on Modal Close (components/frontend/src/components/feedback/FeedbackModal.tsx:129-134)

  • Issue: handleCancel clears error, but if user closes modal via X button or backdrop click, error persists
  • Fix Required: Clear error in onOpenChange callback or use useEffect to reset on close

12. Accessibility - Missing ARIA Live Region (components/frontend/src/components/feedback/FeedbackModal.tsx:210-215)

  • Issue: Error message not announced to screen readers
  • Fix Required: Add role="alert" and aria-live="assertive" to error div
  • Impact: Poor accessibility for users with screen readers

13. Environment Variable Documentation Incomplete (components/frontend/.env.example:34-40)

  • Issue: Example shows LANGFUSE_SECRET_KEY but:
    • Doesn't explain it should NOT be used in frontend
    • Doesn't mention it's for backend only (if moved)
  • Fix Required: Remove from .env.example or add clear warning comment

🔵 Minor Issues

14. Unused Import in FeedbackButtons (components/frontend/src/components/feedback/FeedbackButtons.tsx:18)

  • Issue: messageTimestamp prop is accepted but never used
  • Fix: Remove from props or use it in the feedback submission

15. Magic Numbers in UI (components/frontend/src/components/feedback/FeedbackButtons.tsx:65-66)

  • Issue: Hardcoded color values (green-500/10, red-500/10) repeated
  • Recommendation: Extract to constants or use Tailwind theme variables
  • Impact: Low - but hurts maintainability

16. Missing JSDoc Comments (All new files)

  • Issue: Public components and functions lack documentation
  • Recommendation: Add JSDoc comments for:
    • FeedbackButtons component
    • FeedbackModal component
    • API route handler
    • getLangfuseClient function
  • Impact: Low - but improves developer experience

17. Console.warn Instead of Proper Logging (components/frontend/src/lib/langfuseClient.ts:23, route.ts:66)

  • Issue: Using console.warn instead of structured logging
  • Recommendation: Use proper logging library (if available) or at minimum console.error for errors
  • Pattern: Backend uses structured logging (error-handling.md:26-40)

18. Button className Pattern Inconsistency (components/frontend/src/components/ui/button.tsx:10)

  • Issue: Added cursor-pointer to all buttons globally
  • Risk: May conflict with disabled state styling in some edge cases
  • Recommendation: Review if this should be applied via :not([disabled]) or similar

19. Checkbox className Pattern Inconsistency (components/frontend/src/components/ui/checkbox.tsx:16)

  • Issue: Same as button - added cursor-pointer globally
  • Recommendation: Ensure it doesn't conflict with disabled/readonly states

20. Hardcoded API Endpoint (components/frontend/src/components/feedback/FeedbackModal.tsx:95)

  • Issue: /api/feedback is hardcoded
  • Recommendation: Use API_BASE_URL or similar constant for consistency
  • Impact: Very low - Next.js API routes are always at /api

Positive Highlights

Excellent UX Design: The feedback buttons are well-designed with:

  • Clear visual states (submitted, hover, focus)
  • Helpful tooltips
  • Confirmation with checkmark icon
  • Thoughtful modal flow

Good Privacy Considerations:

  • Optional transcript inclusion
  • Clear privacy disclaimer in modal
  • User controls what data is shared

Proper Component Structure:

  • Clean separation between FeedbackButtons and FeedbackModal
  • Reusable FeedbackContext pattern
  • Good use of Shadcn UI components

TypeScript Type Safety (mostly):

  • Proper type definitions for FeedbackRequest
  • Type guards in extractMessageText helper
  • Good use of discriminated unions (FeedbackType)

Graceful Degradation:

  • Components don't render if context unavailable
  • Langfuse client returns null if not configured
  • Optional env vars don't break deployment

Follows Shadcn UI Patterns:

  • Uses existing UI components (Dialog, Button, Textarea, Checkbox)
  • Consistent with codebase design system
  • No custom UI built from scratch

Recommendations

Immediate Actions (Before Merge)

  1. Remove LANGFUSE_SECRET_KEY from frontend deployment - Critical security fix
  2. Add authentication/authorization to /api/feedback route - Prevent unauthorized feedback submission
  3. Convert fetch() to React Query mutation - Follow codebase patterns
  4. Add error handling around langfuse.score() - Prevent silent failures
  5. Add PII/sensitive data warnings in UI - User awareness

High Priority (Should Address)

  1. Implement rate limiting - Prevent abuse
  2. Persist feedback state - Better UX on page refresh
  3. Add loading states to buttons - Pattern compliance
  4. Fix error state persistence - Better UX
  5. Add ARIA attributes for accessibility - Screen reader support

Nice to Have (Future Improvements)

  1. Add JSDoc documentation - Developer experience
  2. Extract magic numbers to constants - Maintainability
  3. Add unit tests - Test coverage (no tests added in this PR)
  4. Consider backend API endpoint instead - Could be part of backend Go API for consistency

Architecture Discussion

Question: Should feedback collection be a frontend API route or a backend endpoint?

Current: Frontend Next.js API route (/api/feedback)
Alternative: Backend Go API endpoint (/api/projects/:project/feedback)

Pros of Backend Approach:

  • Centralized auth/RBAC (already implemented in backend)
  • Consistent with other API patterns
  • Better for secret management
  • Can leverage existing K8s client patterns

Cons of Backend Approach:

  • Requires backend changes
  • More complex deployment

Recommendation: Consider moving to backend in future iteration for better security and consistency.


Pre-Commit Checklist Status

Based on frontend checklist (CLAUDE.md:1122-1136):

  • ❌ Zero any types - ✅ PASS
  • ❌ All UI uses Shadcn components - ✅ PASS
  • ❌ All data operations use React Query - ❌ FAIL (manual fetch in modal)
  • ❌ Components under 200 lines - ✅ PASS (FeedbackModal is 230 but acceptable for dialog)
  • ❌ Single-use components colocated - ✅ PASS (feedback/* is properly structured)
  • ❌ All buttons have loading states - ❌ FAIL (feedback buttons missing loading state)
  • ❌ All lists have empty states - N/A
  • ❌ All nested pages have breadcrumbs - N/A
  • ❌ All routes have loading.tsx, error.tsx - N/A (not a route)
  • npm run build passes - ⚠️ UNKNOWN (should verify)
  • ❌ All types use type instead of interface - ✅ PASS

Checklist Score: 4/7 applicable items passed


Security Checklist Status

Based on security standards (security-standards.md:206-241):

Authentication:

  • ❌ No user token validation - ❌ FAIL

Authorization:

  • ❌ No RBAC check - ❌ FAIL
  • ❌ No namespace validation - ❌ FAIL

Secrets & Tokens:

  • ❌ Secret key in frontend deployment - ❌ FAIL
  • ✅ No tokens in logs - ✅ PASS

Input Validation:

  • ✅ Required fields validated - ✅ PASS
  • ⚠️ No sanitization of user input - ⚠️ WARNING

Container Security:

  • N/A (frontend only)

Security Score: 2/6 items passed


Final Recommendation

Status: ⚠️ NEEDS WORK - Do not merge in current state

This is a well-designed feature with good UX, but has critical security issues that must be addressed:

  1. Blocker: Remove secret key from frontend deployment
  2. Critical: Add authentication/authorization to API route
  3. Critical: Follow React Query patterns for data fetching
  4. Critical: Add error handling for Langfuse SDK calls

Once these issues are resolved, this will be a solid addition to the platform. The core idea and implementation approach are sound.

Estimated Effort to Fix: 4-6 hours

  • 1h: Security fixes (remove secret, add auth)
  • 2h: React Query migration
  • 1h: Error handling and loading states
  • 1-2h: Testing and validation

Note: This is a WIP PR as indicated by the title. The above issues should be addressed before removing the WIP status.


🔍 View AI decision process (logs available for 90 days)

📋 View memory system files loaded (click to expand)

What Amber Loaded for Code Review

Amber automatically loaded these repository standards from the memory system:

  1. CLAUDE.md - Master project instructions, development standards
  2. backend-development.md - Go backend, K8s integration patterns
  3. frontend-development.md - NextJS, Shadcn UI, React Query patterns
  4. security-standards.md - Auth, RBAC, token handling
  5. k8s-client-usage.md - User token vs service account patterns
  6. error-handling.md - Consistent error patterns
  7. react-query-usage.md - Data fetching patterns

Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs #359, #360) - not just generic code review guidelines.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Claude Code Review

Summary

This PR implements a per-message user feedback mechanism with thumbs up/down buttons and a modal for detailed feedback submission to Langfuse. The implementation follows frontend patterns well but has several security, error handling, and architecture issues that need to be addressed.

Overall Assessment: Good UX implementation with clean component design, but requires security hardening, error handling improvements, and better API client patterns before merging.


Issues by Severity

🚫 Blocker Issues

1. Missing Authentication/Authorization on API Route (Security Critical)

  • File: components/frontend/src/app/api/feedback/route.ts
  • Issue: The /api/feedback route accepts username from client request body without verification
  • Risk: Any user can submit feedback claiming to be any other user
  • Required Fix:
    • Extract username from authenticated session (cookies, JWT, or headers)
    • Validate user has access to the specified project/session
    • Never trust client-provided identity claims
  • Pattern Violation: Security Standards - "Always check permissions before operations"
  • Reference: .claude/context/security-standards.md:209-220

2. Manual fetch() Call Violates React Query Pattern (Architecture Critical)

  • File: components/frontend/src/components/feedback/FeedbackModal.tsx:95
  • Issue: Direct fetch('/api/feedback') instead of using React Query
  • Pattern Violation: Frontend Development Standards - "React Query for ALL Data Operations"
  • Required Fix:
    • Create src/services/api/feedback.ts with API client functions
    • Create src/services/queries/feedback.ts with useSubmitFeedback mutation hook
    • Use mutation hook in FeedbackModal component
  • Reference: .claude/patterns/react-query-usage.md:356-372, CLAUDE.md:1117

🔴 Critical Issues

3. No Error Logging in API Route (Observability)

  • File: components/frontend/src/app/api/feedback/route.ts:123
  • Issue: Generic console.error without structured logging or context
  • Impact: Makes debugging production issues difficult
  • Fix: Add structured error logging with request context
console.error('Error submitting feedback:', {
  error: error instanceof Error ? error.message : String(error),
  username,
  projectName,
  sessionName,
  traceId: effectiveTraceId,
});

4. Langfuse Client Singleton Pattern Issues (Architecture)

  • File: components/frontend/src/lib/langfuseClient.ts:11-17
  • Issue: Module-level singleton may cause issues in serverless/edge environments
  • Risk: Stale config, memory leaks, or config from wrong environment
  • Fix: Consider per-request instantiation or proper cleanup
export function getLangfuseClient(): LangfuseWeb | null {
  const publicKey = process.env.LANGFUSE_PUBLIC_KEY;
  const host = process.env.LANGFUSE_HOST;
  
  if (\!publicKey || \!host) {
    return null;
  }
  
  // Create fresh instance (Langfuse SDK is lightweight)
  return new LangfuseWeb({ publicKey, baseUrl: host });
}

5. Missing Input Validation on Transcript Data (Security)

  • File: components/frontend/src/app/api/feedback/route.ts:84-89
  • Issue: No validation of transcript array structure before processing
  • Risk: Could throw runtime errors if malformed data sent
  • Fix: Validate transcript structure
if (includeTranscript && Array.isArray(transcript)) {
  const validTranscript = transcript.filter(
    m => m && typeof m === 'object' && 
    typeof m.role === 'string' && 
    typeof m.content === 'string'
  );
  // ... process validTranscript
}

🟡 Major Issues

6. Context Provider Re-renders on Every Message (Performance)

  • File: components/frontend/src/contexts/FeedbackContext.tsx:40-51
  • Issue: useMemo dependency on messages array causes re-render on every message update
  • Impact: All child components re-render unnecessarily
  • Fix: Use stable references or selectors
// Option 1: Don't memoize messages, access directly when needed
const value = useMemo(
  () => ({
    projectName,
    sessionName,
    username,
    initialPrompt,
    activeWorkflow,
    traceId,
    getMessages: () => messages, // Function reference is stable
  }),
  [projectName, sessionName, username, initialPrompt, activeWorkflow, traceId]
);

7. any Type Violation (Code Quality)

  • File: Multiple locations (need to check with TypeScript)
  • Issue: Frontend standards require zero any types
  • Pattern Violation: CLAUDE.md:1115 - "Zero any Types"
  • Action: Run TypeScript check to identify violations

8. Missing Loading State During Feedback Submission (UX)

  • File: components/frontend/src/components/feedback/FeedbackModal.tsx:95-121
  • Issue: While isSubmitting is tracked, there's no visual feedback if the request hangs
  • Fix: Add timeout and better error handling
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 10000);

try {
  const response = await fetch('/api/feedback', {
    method: 'POST',
    signal: controller.signal,
    // ...
  });
  clearTimeout(timeoutId);
  // ...
} catch (err) {
  clearTimeout(timeoutId);
  if (err.name === 'AbortError') {
    setError('Request timed out. Please try again.');
  }
  // ...
}

9. Environment Variables Not Documented in Deployment Manifests (DevOps)

  • File: components/manifests/base/frontend-deployment.yaml:14
  • Issue: New LANGFUSE_PUBLIC_KEY and LANGFUSE_HOST env vars added to local dev but not base deployment
  • Impact: Production deployments won't have feedback functionality
  • Fix: Add to base deployment with comments about optional nature

🔵 Minor Issues

10. Inconsistent Button Styling (UI Consistency)

  • File: components/frontend/src/components/feedback/FeedbackButtons.tsx:61-71
  • Issue: Using raw <button> instead of Shadcn <Button> component
  • Pattern Violation: CLAUDE.md:1116 - "Shadcn UI Components Only"
  • Fix: Use <Button variant="ghost" size="sm"> for consistency

11. Type Import Style Inconsistency (Code Style)

  • Files: FeedbackModal.tsx:18, FeedbackContext.tsx:4
  • Issue: Using import type for some but not all type imports
  • Fix: Use import type consistently for all type-only imports

12. Missing JSDoc Comments on Public API (Documentation)

  • Files: FeedbackButtons.tsx, FeedbackContext.tsx
  • Issue: No JSDoc on exported components/hooks
  • Fix: Add JSDoc for better developer experience
/**
 * Feedback buttons component that displays thumbs up/down for user feedback.
 * Requires FeedbackProvider in parent tree.
 * 
 * @param messageContent - The message content to provide context for feedback
 * @param messageTimestamp - Timestamp of the message
 */
export function FeedbackButtons({ ... }) { ... }

13. Hardcoded Strings Should Be Constants (Maintainability)

  • File: components/frontend/src/app/api/feedback/route.ts:109
  • Issue: Magic string 'user-feedback' should be a named constant
const FEEDBACK_SCORE_NAME = 'user-feedback' as const;

langfuse.score({
  // ...
  name: FEEDBACK_SCORE_NAME,
  // ...
});

14. FeedbackContext TypeScript Type Could Use type Instead of Inline (Code Style)

  • File: components/frontend/src/contexts/FeedbackContext.tsx:6-15
  • Current: Inline type definition
  • Preferred: Export as named type for reusability
export type FeedbackContextValue = {
  projectName: string;
  // ... (already correct\!)
};

Note: This is already correct, no action needed


Positive Highlights

Excellent Component Composition - Clean separation between FeedbackButtons, FeedbackModal, and FeedbackContext

Good UX Design - Tooltips, loading states, visual feedback on submission, and privacy disclaimer

Proper Use of Shadcn UI - Dialog, Button, Textarea, Checkbox all correctly used

Accessibility - aria-labels on buttons, proper semantic HTML

Privacy-Conscious - Clear opt-in for transcript inclusion with privacy notice

Type Safety - Good use of TypeScript types (FeedbackType, FeedbackRequest, etc.)

Error Handling in UI - Error state displayed to users in modal

Follows Submission Pattern - Disable submit button, show spinner, handle success/error


Recommendations

Priority 1 (Blocker - Must Fix Before Merge)

  1. Add authentication/authorization to /api/feedback route
    • Extract authenticated user from session
    • Validate access to project/session
    • Remove username from request body
  2. Migrate to React Query pattern
    • Create src/services/api/feedback.ts
    • Create src/services/queries/feedback.ts with mutation hook
    • Update FeedbackModal to use the hook

Priority 2 (Critical - Should Fix Before Merge)

  1. Add structured error logging in API route
  2. Fix Langfuse client singleton pattern
  3. Add input validation for transcript data
  4. Run npm run build to check for any types

Priority 3 (Major - Address Soon)

  1. Optimize FeedbackContext re-renders
  2. Add timeout handling for feedback submission
  3. Add LANGFUSE env vars to base deployment manifest
  4. Document Langfuse configuration in main README

Priority 4 (Minor - Nice to Have)

  1. Replace raw buttons with Shadcn Button component
  2. Add JSDoc comments to public APIs
  3. Extract magic strings to constants
  4. Add unit tests for extractMessageText helper

Testing Recommendations

Before merging:

  • Test with Langfuse not configured (should gracefully degrade)
  • Test with malformed transcript data
  • Test with unauthenticated user (after auth fix)
  • Test with user lacking project access (after authz fix)
  • Test feedback submission timeout/failure scenarios
  • Verify no any types: npm run build
  • Test rapid clicking of feedback buttons (debouncing?)

Architecture Notes

This PR introduces a new integration point with Langfuse for user feedback. Consider:

  1. Should this be behind a feature flag? (e.g., ENABLE_FEEDBACK=true)
  2. Should feedback be stored locally first, then synced to Langfuse? (offline support)
  3. Should there be rate limiting on feedback submissions?
  4. How will feedback be monitored/reviewed? (Langfuse dashboard access)

Estimated effort to address blockers: 2-3 hours
Estimated effort to address all critical issues: 4-6 hours total

Great work on the UX! The feedback mechanism looks polished. Focus on the security and architecture issues before merging, and this will be a solid addition to the platform.


🔍 View AI decision process (logs available for 90 days)

📋 View memory system files loaded (click to expand)

What Amber Loaded for Code Review

Amber automatically loaded these repository standards from the memory system:

  1. CLAUDE.md - Master project instructions, development standards
  2. backend-development.md - Go backend, K8s integration patterns
  3. frontend-development.md - NextJS, Shadcn UI, React Query patterns
  4. security-standards.md - Auth, RBAC, token handling
  5. k8s-client-usage.md - User token vs service account patterns
  6. error-handling.md - Consistent error patterns
  7. react-query-usage.md - Data fetching patterns

Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs #359, #360) - not just generic code review guidelines.

@andybraren andybraren marked this pull request as ready for review January 16, 2026 08:15
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Claude Code Review

Summary

This PR implements a per-message user feedback mechanism with thumbs up/down buttons and a detailed feedback modal. The implementation integrates with Langfuse for tracking feedback scores.

Overall Assessment: Good implementation with solid UX patterns, but has several critical security and architectural issues that must be addressed before merge.


Issues by Severity

Blocker Issues

1. CRITICAL: Missing Input Validation (route.ts:54-60)

  • Location: components/frontend/src/app/api/feedback/route.ts:54-60
  • Issue: Insufficient validation of user inputs before sending to Langfuse
  • Violations: No validation of value range, no sanitization for log injection, no length limits
  • Security Standards Violation: Input Validation pattern from security-standards.md
  • Fix Required: Add validation for value range (0 or 1), sanitize strings, add length limits

2. CRITICAL: Missing Error Context Logging (route.ts:122-128)

  • Location: components/frontend/src/app/api/feedback/route.ts:122-128
  • Issue: Generic error logging without context
  • Pattern Violation: CLAUDE.md Backend Error Handling Pattern 2 requires logging with context
  • Fix Required: Include projectName, sessionName, username in error logs

3. CRITICAL: Environment Variable Documentation Gap (langfuseClient.ts:19-20)

  • Location: components/frontend/src/lib/langfuseClient.ts
  • Issue: LANGFUSE_PUBLIC_KEY and LANGFUSE_HOST need clearer documentation
  • Risk: Developers might accidentally expose these by adding NEXT_PUBLIC_ prefix
  • Fix Required: Add deployment documentation clarifying these are server-only secrets

Critical Issues

4. Architectural: No React Query Integration (FeedbackModal.tsx:95-110)

  • Location: components/frontend/src/components/feedback/FeedbackModal.tsx:95-110
  • Violation: Frontend Development Standards Rule Epic: Data Source Integration #3 - React Query for ALL Data Operations
  • Issue: Manual fetch() call instead of using React Query mutation
  • Fix Required: Create mutation hook in @/services/queries/feedback.ts

5. Missing Loading States (FeedbackButtons.tsx:62-81)

  • Location: components/frontend/src/components/feedback/FeedbackButtons.tsx
  • Violation: Frontend Pre-Commit Checklist - All buttons have loading states
  • Issue: Thumbs up/down buttons dont show loading state while submitting
  • Impact: User could click multiple times, causing duplicate submissions
  • Fix Required: Pass isSubmitting prop from modal to buttons

Major Issues

6. Error Handling: Silent Langfuse Failures (route.ts:65-71)

  • Location: components/frontend/src/app/api/feedback/route.ts:65-71
  • Issue: If Langfuse not configured, returns success: false but still returns 200 OK
  • Problem: Frontend treats this as success
  • Fix Required: Return 503 Service Unavailable instead

7. Privacy Concern: Full Transcript Inclusion (FeedbackModal.tsx:91-93)

  • Issue: When user checks Include all messages, ENTIRE conversation history is sent
  • Risk: Could inadvertently include sensitive information
  • Recommendation: Make privacy disclaimer more specific, consider limiting to last N messages

Positive Highlights

✅ Excellent UX Patterns - Smooth feedback flow, clear visual feedback, disabled state
✅ Privacy-Conscious Design - Uses public key only, optional transcript inclusion
✅ Well-Structured Components - Clean separation of concerns, proper TypeScript types
✅ Integration with Existing System - Reuses Langfuse infrastructure, consistent with trace ID approach
✅ Deployment Configuration - Proper env vars, Kubernetes secrets with optional: true


Final Verdict

⚠️ Recommend: REQUEST CHANGES

Critical issues that must be fixed before merge:

  1. Input validation is incomplete (security risk)
  2. React Query pattern not followed (violates frontend standards)
  3. Error handling needs improvement (UX and debugging)

Estimated Time to Fix: 2-4 hours for blockers + critical issues

📋 Next Steps: Please address blocker issues #1-3 and critical issue #4, then request re-review.


🔍 View AI decision process (logs available for 90 days)

📋 View memory system files loaded (click to expand)

What Amber Loaded for Code Review

Amber automatically loaded these repository standards from the memory system:

  1. CLAUDE.md - Master project instructions, development standards
  2. backend-development.md - Go backend, K8s integration patterns
  3. frontend-development.md - NextJS, Shadcn UI, React Query patterns
  4. security-standards.md - Auth, RBAC, token handling
  5. k8s-client-usage.md - User token vs service account patterns
  6. error-handling.md - Consistent error patterns
  7. react-query-usage.md - Data fetching patterns

Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs #359, #360) - not just generic code review guidelines.

- Added a `sanitizeString` function to clean user inputs by removing control characters and normalizing line endings.
- Updated the feedback submission process to sanitize various fields including username, project name, session name, comment, workflow, context, and trace ID.
- Ensured transcript entries are also sanitized before processing.

These changes enhance security by mitigating the risk of log injection attacks, improving the overall integrity of the feedback data submitted.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Claude Code Review

Summary

This PR implements a user feedback mechanism for messages using Langfuse's Scores API. The implementation adds thumbs up/down buttons for agent messages with an optional detailed feedback modal. Overall implementation is clean with good security practices (input sanitization, proper secret handling). However, there are several important issues to address before merging.

Issues by Severity

🚫 Blocker Issues

1. Frontend Design Guidelines Violation - any Type Usage

  • Location: src/components/ui/checkbox.tsx:27, src/components/ui/message.tsx:33-38
  • Issue: Uses any type which violates the zero any types rule from CLAUDE.md and frontend design guidelines
  • Standard: "Zero any Types - Use proper types, unknown, or generic constraints"
  • Fix Required:
    // In checkbox.tsx
    type CheckedState = boolean | 'indeterminate'
    
    // In message.tsx - properly type the code component props
    code: ({ inline, className, children, ...props }: React.ComponentPropsWithoutRef<'code'> & { inline?: boolean }) => {

🔴 Critical Issues

2. Missing Type Definitions for useCurrentUser Query

  • Location: src/app/projects/[name]/sessions/[sessionName]/page.tsx:194
  • Issue: useCurrentUser is imported but not defined in the codebase (grep shows no implementation)
  • Impact: Runtime error - undefined function
  • Fix Required: Either:
    • Remove this line if not needed yet
    • Implement the query in src/services/queries/
    • Use existing user context/authentication mechanism

3. Security - LangfuseWeb Client Not Properly Scoped

  • Location: src/lib/langfuseClient.ts:11
  • Issue: Module-level singleton langfuseClient variable is shared across all requests in serverless/edge functions
  • Impact: Potential data leakage between different user sessions in production (Next.js API routes are stateless)
  • Standard Violation: While not explicitly in CLAUDE.md, this violates general Next.js API route best practices
  • Fix Required: Remove caching, instantiate new client per request:
    export function getLangfuseClient(): LangfuseWeb | null {
      const publicKey = process.env.LANGFUSE_PUBLIC_KEY;
      const host = process.env.LANGFUSE_HOST;
      
      if (\!publicKey || \!host) {
        console.warn('Langfuse not configured');
        return null;
      }
      
      return new LangfuseWeb({ publicKey, baseUrl: host });
    }

4. Type Safety - Direct Type Assertions Without Checking

  • Location: src/app/api/feedback/route.ts:34
  • Issue: FeedbackRequest type is defined but Next.js doesn't validate JSON automatically
  • Standard Violation: CLAUDE.md Section "Input Validation" - "Validate All User Input"
  • Fix Required: Add runtime validation:
    const body = await request.json();
    
    // Validate required fields exist and are correct types
    if (\!body || typeof body \!== 'object') {
      return NextResponse.json({ error: 'Invalid request body' }, { status: 400 });
    }

🟡 Major Issues

5. Missing React Query Integration

  • Location: src/components/feedback/FeedbackModal.tsx:93
  • Issue: Uses manual fetch() call instead of React Query mutation
  • Standard Violation: Frontend Development Context - "React Query for ALL Data Operations"
  • Impact: No caching, no automatic retry, no optimistic updates, inconsistent with project patterns
  • Fix Required: Create useFeedbackMutation hook in src/services/queries/:
    // src/services/queries/feedback.ts
    export function useFeedbackMutation() {
      return useMutation({
        mutationFn: (data: FeedbackRequest) => 
          fetch('/api/feedback', {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify(data),
          }).then(r => r.ok ? r.json() : Promise.reject(r)),
        onError: (error) => {
          // Show toast notification
        },
      });
    }

6. Error Handling Pattern Inconsistency

  • Location: src/app/api/feedback/route.ts:156-164
  • Issue: Generic error message without structured logging
  • Standard Violation: Error Handling Patterns - "Log errors with context"
  • Fix Required:
    } catch (error) {
      const errorMessage = error instanceof Error ? error.message : 'Unknown error';
      console.error('[Feedback API] Error submitting feedback:', {
        error: errorMessage,
        stack: error instanceof Error ? error.stack : undefined,
      });
      return NextResponse.json(
        { error: 'Failed to submit feedback' },
        { status: 500 }
      );
    }

7. Missing Loading States in Shadcn Components

  • Location: src/components/feedback/FeedbackButtons.tsx:60-81
  • Issue: Buttons don't show loading state during submission
  • Standard Violation: Frontend Pre-Commit Checklist - "All buttons have loading states"
  • Fix Required: Add isPending state from mutation and disable buttons during submission

8. Accessibility - Missing ARIA Labels

  • Location: src/components/feedback/FeedbackButtons.tsx
  • Issue: Tooltip content is present but screen reader support could be improved
  • Recommendation: Already has aria-label - good! But consider adding aria-live region for feedback submission status

🔵 Minor Issues

9. Input Sanitization Could Be More Robust

  • Location: src/app/api/feedback/route.ts:40-47
  • Issue: Good job implementing sanitization! However, consider additional protections:
    • Max length validation (prevent extremely long inputs)
    • HTML entity encoding for metadata fields
  • Recommendation (not blocking):
    function sanitizeString(input: string, maxLength = 10000): string {
      const truncated = input.substring(0, maxLength);
      return truncated
        .replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g, '')
        .replace(/\r\n/g, '\n')
        .replace(/\r/g, '\n');
    }

10. Console Warnings for Missing Config

  • Location: src/lib/langfuseClient.ts:23, src/app/api/feedback/route.ts:96
  • Issue: console.warn is fine but consider using structured logging
  • Recommendation: Use proper logger (pino, winston) for production consistency

11. TypeScript - Prefer type Over interface

  • Location: src/contexts/FeedbackContext.tsx:6
  • Issue: Uses type correctly (good!)
  • Note: Consistent with frontend standards ✅

12. Component Size

  • Location: FeedbackModal.tsx (230 lines)
  • Issue: Slightly exceeds recommended 200 line limit but acceptable given complexity
  • Recommendation: Consider extracting privacy notice to separate component if adding more features

Positive Highlights

Excellent Security Implementation

  • Input sanitization function prevents log injection attacks (line 40-47)
  • Properly removed LANGFUSE_SECRET_KEY from frontend config
  • Uses public-key-only LangfuseWeb SDK (no secret key in frontend)

Good UX Design

  • Thumbs up/down with visual feedback
  • Disabled state prevents duplicate submissions
  • Optional transcript inclusion with clear privacy notice
  • Smooth modal interaction flow

Clean Code Organization

  • Proper file structure (components/feedback/)
  • Index file for clean exports
  • Feedback context pattern is well designed

Shadcn UI Usage

  • Correctly uses Dialog, Button, Textarea, Checkbox components
  • Follows established UI patterns

Good Comments and Documentation

  • API route has clear JSDoc comments
  • Function purposes well explained

Recommendations

Priority 1 (Must Fix Before Merge)

  1. Fix blocker Outcome: Reduce Refinement Time with agent System #1 - Remove any types
  2. Fix critical Epic: RAT Architecture & Design #2 - Resolve useCurrentUser undefined import
  3. Fix critical Epic: Data Source Integration #3 - Remove singleton pattern from LangfuseWeb client
  4. Fix critical Epic: AI Agent Development #4 - Add runtime type validation to API route

Priority 2 (Should Fix Before Merge)

  1. Implement React Query mutation for feedback submission (Epic: Jira Integration & Workflow #5)
  2. Improve error logging with structured context (Epic: Testing & Validation #6)
  3. Add loading states to feedback buttons (Test: Automation Workflow Validation #7)

Priority 3 (Nice to Have)

  1. Add max length validation to sanitization
  2. Extract privacy notice component
  3. Consider structured logging library

Testing Recommendations

Add tests for:

  • sanitizeString() function with various injection attempts
  • Feedback submission success/error flows
  • Disabled button states after submission
  • Modal open/close behavior
  • Context provider edge cases (missing provider)

Architecture Compliance

Standard Status Notes
Zero any types Violations in checkbox.tsx and message.tsx
React Query for data ops Uses manual fetch instead of mutation
Shadcn UI components Correctly uses Dialog, Button, etc.
type over interface Consistent usage
Input validation ⚠️ Good sanitization but missing runtime type checks
Error handling ⚠️ Adequate but could be more structured
Security standards Excellent - proper secret handling, sanitization

Overall Assessment: Good implementation with strong security practices, but needs to address the 4 critical issues and align with React Query patterns before merging. The core functionality is solid and the UX is well thought out.

Estimated effort to fix blockers + critical issues: 2-3 hours


🔍 View AI decision process (logs available for 90 days)

📋 View memory system files loaded (click to expand)

What Amber Loaded for Code Review

Amber automatically loaded these repository standards from the memory system:

  1. CLAUDE.md - Master project instructions, development standards
  2. backend-development.md - Go backend, K8s integration patterns
  3. frontend-development.md - NextJS, Shadcn UI, React Query patterns
  4. security-standards.md - Auth, RBAC, token handling
  5. k8s-client-usage.md - User token vs service account patterns
  6. error-handling.md - Consistent error patterns
  7. react-query-usage.md - Data fetching patterns

Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs #359, #360) - not just generic code review guidelines.

@andybraren andybraren changed the title [WIP] Per-message user feedback mechanism Per-message user feedback mechanism Jan 16, 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