Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed app/src/components/settings/panels/FeedbackPanel.test.tsx,app/src/pages/Feedbac

Steven Enamakel9e32dd4ec770
diff --git a/app/src/pages/Feedback.test.tsx b/app/src/components/settings/panels/FeedbackPanel.test.tsx
similarity index 98%
rename from app/src/pages/Feedback.test.tsx
rename to app/src/components/settings/panels/FeedbackPanel.test.tsx
index e33ecd8ceb..1ebc631aa6 100644
--- a/app/src/pages/Feedback.test.tsx
+++ b/app/src/components/settings/panels/FeedbackPanel.test.tsx
@@ -3,8 +3,8 @@ import userEvent from '@testing-library/user-event';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { renderWithProviders } from '../test/test-utils';
-import type { FeedbackItem } from '../types/feedback';
-import Feedback, { acceptedItemMatchesFilters } from './Feedback';
+import type { FeedbackItem } from '../../../types/feedback';
+import Feedback, { acceptedItemMatchesFilters } from './FeedbackPanel';
const mockList = vi.fn();
const mockVote = vi.fn();
@@ -14,7 +14,7 @@ const mockGetFeedback = vi.fn();
const mockAddComment = vi.fn();
const mockValidateFeedback = vi.fn();
-vi.mock('../services/api/feedbackApi', () => ({
+vi.mock('../../../services/api/feedbackApi', () => ({
feedbackApi: {
listFeedback: (...args: unknown[]) => mockList(...args),
voteFeedback: (...args: unknown[]) => mockVote(...args),
@@ -29,7 +29,7 @@ vi.mock('../services/api/feedbackApi', () => ({
// Drive `isAdmin` (which gates the status control) without standing up a full
// core-state snapshot; flip `role` to 'admin' only in the tests that need it.
const userRole = vi.hoisted(() => ({ current: 'user' as 'user' | 'admin' }));
-vi.mock('../hooks/useUser', () => ({
+vi.mock('../../../hooks/useUser', () => ({
useUser: () => ({
user: { role: userRole.current },
isLoading: false,
diff --git a/app/src/pages/Feedback.tsx b/app/src/components/settings/panels/FeedbackPanel.tsx
similarity index 89%
rename from app/src/pages/Feedback.tsx
rename to app/src/components/settings/panels/FeedbackPanel.tsx
index 788266aef8..d9491972cd 100644
--- a/app/src/pages/Feedback.tsx
+++ b/app/src/components/settings/panels/FeedbackPanel.tsx
@@ -1,17 +1,17 @@
import debugFactory from 'debug';
import { useCallback, useEffect, useRef, useState } from 'react';
-import FeedbackFilterSelect from '../components/feedback/FeedbackFilterSelect';
-import FeedbackItemRow from '../components/feedback/FeedbackItemRow';
-import FeedbackSubmitForm from '../components/feedback/FeedbackSubmitForm';
-import SettingsTabbedPage from '../components/settings/layout/SettingsTabbedPage';
-import Button from '../components/ui/Button';
-import { useUser } from '../hooks/useUser';
-import { useT } from '../lib/i18n/I18nContext';
-import { feedbackApi } from '../services/api/feedbackApi';
-import type { FeedbackItem, FeedbackSort, FeedbackStatus, FeedbackType } from '../types/feedback';
+import FeedbackFilterSelect from '../../feedback/FeedbackFilterSelect';
+import FeedbackItemRow from '../../feedback/FeedbackItemRow';
+import FeedbackSubmitForm from '../../feedback/FeedbackSubmitForm';
+import SettingsTabbedPage from '../layout/SettingsTabbedPage';
+import Button from '../../ui/Button';
+import { useUser } from '../../../hooks/useUser';
+import { useT } from '../../../lib/i18n/I18nContext';
+import { feedbackApi } from '../../../services/api/feedbackApi';
+import type { FeedbackItem, FeedbackSort, FeedbackStatus, FeedbackType } from '../../../types/feedback';
-const log = debugFactory('feedback:page');
+const log = debugFactory('feedback:panel');
const PAGE_SIZE = 20;
@@ -40,7 +40,7 @@ export function acceptedItemMatchesFilters(
);
}
-const Feedback = () => {
+const FeedbackPanel = () => {
const { t } = useT();
const { user } = useUser();
const isAdmin = user?.role === 'admin';
@@ -136,11 +136,14 @@ const Feedback = () => {
const hasMore = items.length < total;
return (
- // `p-4` is the gutter SettingsTabbedPage's full-bleed divider bleeds
- // through, and `h-full` is what makes the body scroll: the content surface
- // is `overflow-hidden`, so the `min-h-full` wrapper this replaced grew past
- // the card and the board below the fold was unreachable.
- <div className="h-full p-4" data-testid="feedback-page">
+ // No `h-full p-4` wrapper any more. This was a standalone routed page and
+ // needed one: the content surface is `overflow-hidden`, so it had to claim
+ // the height and scroll itself or the board fell below an unreachable fold.
+ // As a settings panel it is mounted through `wrapSettingsPage`, which is
+ // that scroll container (`h-full min-h-0 overflow-y-auto`) — keeping the
+ // wrapper would have nested a second scroller inside it. Every other panel
+ // renders `SettingsTabbedPage` bare for the same reason.
+ <div data-testid="feedback-page">
<SettingsTabbedPage
title={t('feedback.header.title')}
description={t('feedback.header.desc')}>
@@ -264,4 +267,4 @@ const Feedback = () => {
);
};
-export default Feedback;
+export default FeedbackPanel;