Skip to content

Commit b47dd96

Browse files
saagar210claude
andcommitted
refactor(features): inline workspace/inbox wrappers, drop dead helper
WorkspacePage and InboxPage were pass-through wrappers around WorkspaceRevampPage and QueueCommandCenterPage respectively — artifacts of the now-completed revamp migration. Collapses the indirection. Workspace: - Renames WorkspaceRevampPage.tsx/.css to WorkspacePage.tsx/.css, overwriting the former wrapper - Renames the exported component, prop interface, className tokens (workspace-revamp* -> workspace-page*) and data-testid accordingly - Prunes dead CSS selectors that targeted the "standard" rail branch removed in the prior flag cleanup: .workspace-revamp__rail, .workspace-revamp__playbook, the --solo modifier, and the responsive rail-reorder rule. Simplifies the grid to single-column - Deletes WorkspacePage.test.tsx — it only exercised the wrapper pass-through; WorkspacePage behavior is covered by renderActiveTab.test and the DraftTab suite - Updates features/workspace/index.ts to a single export - Updates the stale WorkspaceRevampPage reference in the WorkspaceQueueContext.css header comment Inbox: - Replaces the 23-line InboxPage wrapper with a single re-export: export { QueueCommandCenterPage as InboxPage } from "../revamp" - Deletes InboxPage.test.tsx — behavior is covered by the existing QueueCommandCenterPage test suite Flags: - Removes the unused getEnabledRevampFlags export from flags.ts. It had no consumers anywhere in src/ and was a leftover from the earlier preview-mode messaging system Net: 174 removed / 25 added across 10 files. No behavioral change; renders and routes are identical. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a61055f commit b47dd96

10 files changed

Lines changed: 25 additions & 174 deletions

src/features/inbox/InboxPage.test.tsx

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/features/inbox/InboxPage.tsx

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1 @@
1-
import type { SavedDraft } from "../../types/workspace";
2-
import type { QueueView } from "./queueModel";
3-
import { QueueCommandCenterPage } from "../revamp";
4-
5-
interface InboxPageProps {
6-
onLoadDraft: (draft: SavedDraft) => void;
7-
initialQueueView?: QueueView | null;
8-
onQueueViewConsumed?: () => void;
9-
}
10-
11-
export function InboxPage({
12-
onLoadDraft,
13-
initialQueueView = null,
14-
onQueueViewConsumed,
15-
}: InboxPageProps) {
16-
return (
17-
<QueueCommandCenterPage
18-
onLoadDraft={onLoadDraft}
19-
initialQueueView={initialQueueView}
20-
onQueueViewConsumed={onQueueViewConsumed}
21-
/>
22-
);
23-
}
1+
export { QueueCommandCenterPage as InboxPage } from "../revamp";

src/features/revamp/flags.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,3 @@ export function resolveRevampFlags({
204204
},
205205
);
206206
}
207-
208-
export function getEnabledRevampFlags(flags: RevampFlags): RevampFlagId[] {
209-
// "Revamp enabled" is used for preview-mode messaging. Keep this narrowly scoped
210-
// to actual revamp / routing toggles, not general feature policy flags.
211-
const revampScoped: RevampFlagId[] = (
212-
Object.keys(flags) as RevampFlagId[]
213-
).filter((flagId) => {
214-
return (
215-
flagId.startsWith("ASSISTSUPPORT_REVAMP_") ||
216-
flagId === "ASSISTSUPPORT_LLM_ROUTER_V2"
217-
);
218-
});
219-
return revampScoped.filter((flagId) => flags[flagId]);
220-
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.workspace-page {
2+
display: grid;
3+
grid-template-columns: 1fr;
4+
gap: var(--space-4, 16px);
5+
height: 100%;
6+
}
7+
8+
.workspace-page__main {
9+
min-width: 0;
10+
}

src/features/workspace/WorkspacePage.test.tsx

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { forwardRef } from "react";
2-
import { type DraftTabHandle } from "../../components/Draft/DraftTab";
3-
import { WorkspaceRevampPage } from "./WorkspaceRevampPage";
2+
import { DraftTab, type DraftTabHandle } from "../../components/Draft/DraftTab";
3+
import "./WorkspacePage.css";
4+
import "../../styles/revamp/index.css";
45

56
interface WorkspacePageProps {
67
onNavigateToSource: (searchQuery: string) => void;
@@ -9,7 +10,15 @@ interface WorkspacePageProps {
910
export const WorkspacePage = forwardRef<DraftTabHandle, WorkspacePageProps>(
1011
function WorkspacePage({ onNavigateToSource }, ref) {
1112
return (
12-
<WorkspaceRevampPage ref={ref} onNavigateToSource={onNavigateToSource} />
13+
<div className="workspace-page" data-testid="workspace-page">
14+
<section className="workspace-page__main">
15+
<DraftTab
16+
ref={ref}
17+
onNavigateToSource={onNavigateToSource}
18+
revampModeEnabled
19+
/>
20+
</section>
21+
</div>
1322
);
1423
},
1524
);

src/features/workspace/WorkspaceQueueContext.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* ============================================================================
22
Workspace Queue Context
33
4-
Shared between WorkspaceRevampPage and RevampShell rail.
4+
Rendered from the RevampShell rail.
55
Keep styling based on revamp tokens so it stays consistent across shells.
66
============================================================================ */
77

src/features/workspace/WorkspaceRevampPage.css

Lines changed: 0 additions & 51 deletions
This file was deleted.

src/features/workspace/WorkspaceRevampPage.tsx

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/features/workspace/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export { WorkspacePage } from './WorkspacePage';
2-
export { WorkspaceRevampPage } from './WorkspaceRevampPage';
1+
export { WorkspacePage } from "./WorkspacePage";

0 commit comments

Comments
 (0)