diff --git a/src/components/platform-entry/PlatformEntryFlowShellImpl.tsx b/src/components/platform-entry/PlatformEntryFlowShellImpl.tsx index c17ad2c3e..99e453336 100644 --- a/src/components/platform-entry/PlatformEntryFlowShellImpl.tsx +++ b/src/components/platform-entry/PlatformEntryFlowShellImpl.tsx @@ -320,10 +320,7 @@ import { remixRpgEntryWorldGallery, } from '../../services/rpg-entry/rpgEntryLibraryClient'; import { navigateHostNativePage } from '../../services/host-bridge/hostBridge'; -import { - getRpgProfilePlayStats, - submitRpgProfileFeedback, -} from '../../services/rpg-entry/rpgProfileClient'; +import { getRpgProfilePlayStats } from '../../services/rpg-entry/rpgProfileClient'; import { requestRpgRuntimeJson } from '../../services/rpg-runtime/rpgRuntimeRequest'; import { type RuntimeGuestRequestOptions } from '../../services/runtimeGuestAuth'; import { squareHoleCreationClient } from '../../services/square-hole-creation'; @@ -374,6 +371,7 @@ import type { CustomWorldProfile } from '../../types'; import { useAuthUi } from '../auth/AuthUiContext'; import { PlatformAcknowledgeStatusDialog } from '../common/PlatformAcknowledgeStatusDialog'; import { PlatformActionButton } from '../common/PlatformActionButton'; +import { FLOATING_FEEDBACK_FORM_URL } from '../common/floatingFeedbackEntryModel'; import { PlatformDangerConfirmDialog } from '../common/PlatformDangerConfirmDialog'; import { PlatformFieldLabel } from '../common/PlatformFieldLabel'; import { PlatformSubpanel } from '../common/PlatformSubpanel'; @@ -550,7 +548,6 @@ import type { import { PlatformEntryWorldDetailView } from './PlatformEntryWorldDetailView'; import { PlatformErrorDialog } from './PlatformErrorDialog'; import { buildExternalGenerationQueueStatus } from './platformExternalGenerationQueueStatusModel'; -import { PlatformFeedbackView } from './PlatformFeedbackView'; import { resolvePlatformGenerationProgressTickDecision } from './platformGenerationProgressTickModel'; import { buildPlatformHostDraftFailureNotification, @@ -2513,8 +2510,9 @@ export function PlatformEntryFlowShellImpl({ useEffect(() => { if (selectionStage === 'profile-feedback') { setPlatformTab('profile'); + setSelectionStage('platform'); } - }, [selectionStage, setPlatformTab]); + }, [selectionStage, setPlatformTab, setSelectionStage]); const openProfileFeedback = useCallback(() => { if (!authUi?.user) { @@ -2522,9 +2520,8 @@ export function PlatformEntryFlowShellImpl({ return; } - setPlatformTab('profile'); - setSelectionStage('profile-feedback'); - }, [authUi, setPlatformTab, setSelectionStage]); + window.open(FLOATING_FEEDBACK_FORM_URL, '_blank', 'noopener,noreferrer'); + }, [authUi]); const enterCreateTab = useCallback(() => { // 只依赖稳定的 setter,避免把 bootstrap 对象的 render 级引用变化 @@ -15543,24 +15540,6 @@ export function PlatformEntryFlowShellImpl({ )} - {selectionStage === 'profile-feedback' && ( - - { - setPlatformTab('profile'); - setSelectionStage('platform'); - }} - onSubmit={submitRpgProfileFeedback} - /> - - )} - {selectionStage === 'work-detail' && !selectedPublicWorkDetail && ( { + const user = userEvent.setup(); + const openWindow = vi + .spyOn(window, 'open') + .mockImplementation(() => null); + mockDesktopPlatformLayout(); + window.history.replaceState(null, '', '/creation'); + const { container } = render(); + + await screen.findByRole('heading', { + name: '陶泥儿 - 开启全民精品游戏创作', + }); + const nav = container.querySelector('.platform-desktop-rail'); + expect(nav).toBeTruthy(); + + await user.click( + within(nav as HTMLElement).getByRole('button', { name: '我的' }), + ); + const shortcutRegion = await screen.findByRole('region', { + name: '常用功能', + }); + + await user.click( + within(shortcutRegion).getByRole('button', { name: /反馈与建议/u }), + ); + + expect(openWindow).toHaveBeenCalledWith( + FLOATING_FEEDBACK_FORM_URL, + '_blank', + 'noopener,noreferrer', + ); + expect(screen.queryByText('反馈与投诉')).toBeNull(); + expect(window.location.pathname).not.toBe('/profile/feedback'); + expect(resolveSelectionStageFromPath(window.location.pathname)).toBe( + 'platform', + ); +}); + test('project page keeps desktop rail with recommend and discover hidden', async () => { mockDesktopPlatformLayout(); window.history.replaceState(null, '', '/project'); diff --git a/src/routing/appPageRoutes.test.ts b/src/routing/appPageRoutes.test.ts index 52c2e24f7..c77578138 100644 --- a/src/routing/appPageRoutes.test.ts +++ b/src/routing/appPageRoutes.test.ts @@ -11,15 +11,12 @@ import { } from './appPageRoutes'; describe('appPageRoutes', () => { - it('resolves profile feedback route', () => { + it('hides the legacy profile feedback route', () => { expect(resolveSelectionStageFromPath('/profile/feedback')).toBe( - 'profile-feedback', + 'platform', ); expect(resolveSelectionStageFromPath('/profile/feedback/')).toBe( - 'profile-feedback', - ); - expect(resolvePathForSelectionStage('profile-feedback')).toBe( - '/profile/feedback', + 'platform', ); }); diff --git a/src/routing/appPageRoutes.ts b/src/routing/appPageRoutes.ts index 7c8dc246e..f1bfbe7a9 100644 --- a/src/routing/appPageRoutes.ts +++ b/src/routing/appPageRoutes.ts @@ -15,7 +15,6 @@ const STAGE_ROUTE_ENTRIES = [ ['creation-home', '/creation'], ['project', '/project'], ['image-editor', '/editor/canvas'], - ['profile-feedback', '/profile/feedback'], ['work-detail', '/works/detail'], ['detail', '/worlds/detail'], ['agent-workspace', '/creation/rpg'],