Skip to content

Commit 0e8435f

Browse files
author
wangchunji
committed
Polish futuristic office UI
1 parent 49127a8 commit 0e8435f

35 files changed

Lines changed: 1758 additions & 868 deletions

.kiro/specs/ui-redesign-composer-only-center-input/design.md

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
The home center composer becomes a compact command bar inspired by the provided reference image. It should feel like a lightweight command input floating over the scene, not like a full task card or autopilot dashboard. The right drawer takes over explanatory and contextual content.
5+
The home center composer remains a compact command bar inspired by the provided reference image, but the surrounding central control area now uses an Ant Design vertical `Splitter`. The upper Splitter panel contains the launch guidance and Support / Logs / Artifacts / Runtime tabs that were previously rendered as a separate bottom panel. The lower Splitter panel contains the compact composer input.
66

77
## Component Strategy
88

@@ -18,27 +18,39 @@ Primary files:
1818
## Target Visual Structure
1919

2020
```text
21-
rounded translucent composer
22-
input row
23-
leading spark/icon
24-
text input / placeholder
25-
send icon button
26-
action row
27-
add file | cite data | generate report | create task | more
21+
rounded translucent center control
22+
Ant Design Splitter vertical
23+
upper panel
24+
launch guidance
25+
Support / Logs / Artifacts / Runtime tabs
26+
lower panel
27+
compact composer
28+
input row
29+
leading spark/icon
30+
text input / placeholder
31+
send icon button
32+
compact controls
33+
add files | runtime meta | submit
2834
```
2935

30-
The container should use restrained glass styling already present in the project: translucent white, subtle border, blur, and low visual weight.
36+
The container should use restrained glass styling already present in the project: translucent white, subtle border, blur, and low visual weight. The Splitter handle should be visible enough to indicate resizing without competing with the composer.
3137

3238
## Data and Interaction
3339

34-
No launch contract changes are planned.
40+
No launch contract changes are planned. The composer remains the submit surface, while the lower Support tab derives destination preview and route planning from the current launch draft.
3541

3642
```text
3743
UnifiedLaunchComposer
3844
-> attachments
3945
-> current runtime mode/context
4046
-> launch/create task flow
4147
-> existing task/workflow stores
48+
49+
OfficeTaskCockpit central control upper panel
50+
-> useNLCommandStore.draftText
51+
-> buildLaunchDestinationPreview
52+
-> buildLaunchRoutePlan
53+
-> LaunchDestinationPreviewCard + RoutePlanningOverlay
4254
```
4355

4456
Clarification remains separate:
@@ -52,14 +64,17 @@ currentDialog absent -> composer-only center
5264

5365
Desktop:
5466

55-
- action buttons remain in one row when possible;
67+
- compact composer controls remain readable;
68+
- destination preview and route planning stay in the Support tab inside the upper Splitter panel rather than expanding inside the composer;
5669
- composer max width remains bounded so it does not become a full-width dashboard card.
70+
- the control panel has a bounded max height so it does not cover the scene or push the composer off-screen.
5771

5872
Tablet/mobile:
5973

6074
- actions can wrap or compact;
6175
- no text overlap;
6276
- send button remains visible.
77+
- the Splitter still stacks support/runtime content above the composer.
6378

6479
## Testing Strategy
6580

@@ -75,6 +90,9 @@ Expected test coverage:
7590
- composer is bare/dense where appropriate;
7691
- action controls are visible;
7792
- large center autopilot guidance is absent by default;
93+
- central control uses a vertical Splitter and renders the control panel above the composer;
94+
- destination preview and route planning are absent from the composer surface;
95+
- destination preview and route planning render in the Support tab when draft text exists;
7896
- clarification panel only appears when current dialog exists.
7997

8098
## Non-Goals

.kiro/specs/ui-redesign-composer-only-center-input/requirements.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@
22

33
## Introduction
44

5-
This follow-up spec covers the home center composer-only input treatment. The user provided a reference image showing a compact rounded composer with a single input row, send button, and action buttons below. The center of the home cockpit should no longer show a large autopilot card. It should keep only the composer surface and let the office scene remain visible.
5+
This follow-up spec covers the home center command treatment. The user provided a reference image showing a compact rounded composer with a single input row, send button, and action buttons below, then refined the target so the former bottom support/runtime panel moves into the central control area above that input. The center of the home cockpit should use a vertical Ant Design Splitter: support/runtime control above, composer below.
66

77
This spec is separate from the home shell spec because the composer visual and interaction details need their own focused acceptance criteria.
88

99
## Requirements
1010

11-
### Requirement 1: Center Shows Only the Composer Surface
11+
### Requirement 1: Center Uses a Control Splitter Above the Composer
1212

13-
**User Story:** As a user on the home page, I want the center bottom area to show only the command input composer, so the office scene remains visible and uncluttered.
13+
**User Story:** As a user on the home page, I want the former bottom support panel to live directly above the command input, so the central control area is unified and the input stays immediately reachable.
1414

1515
#### Acceptance Criteria
1616

17-
1. WHEN the home cockpit renders THEN the center-bottom surface SHALL show one compact composer.
18-
2. WHEN the composer renders THEN it SHALL NOT be accompanied by a large autopilot guidance card in the center.
19-
3. WHEN launch guidance is needed THEN it SHALL be available through the home right drawer `发起` tab.
20-
4. WHEN runtime support context is expanded THEN it SHALL not permanently occupy the center as a large default panel.
17+
1. WHEN the home cockpit renders THEN the center-bottom surface SHALL show one vertical Ant Design Splitter.
18+
2. WHEN the Splitter renders THEN the upper panel SHALL contain the launch guidance and Support / Logs / Artifacts / Runtime tabs that previously lived in the bottom panel.
19+
3. WHEN the Splitter renders THEN the lower panel SHALL contain exactly one compact `UnifiedLaunchComposer`.
20+
4. WHEN the control panel renders THEN it SHALL appear above the composer in DOM order and visual order.
2121
5. THE composer SHALL remain usable with keyboard input and send action.
22+
6. WHEN a draft destination exists THEN destination preview and route planning SHALL render in the Support tab inside the central control panel instead of inside the composer surface.
23+
7. THE implementation SHALL NOT render a second standalone bottom copy of the support/runtime panel below the composer.
2224

2325
### Requirement 2: Match the Reference Composer Structure
2426

@@ -28,7 +30,7 @@ This spec is separate from the home shell spec because the composer visual and i
2830

2931
1. THE composer surface SHALL use a rounded translucent container with restrained shadow and blur.
3032
2. THE main input row SHALL include a placeholder-style prompt and a send icon/button on the right.
31-
3. THE secondary action row SHALL include controls equivalent to add file, cite data, generate report, create new task, and more.
33+
3. THE secondary controls SHALL keep attachment, runtime, and submit access compactly without duplicating lower console actions.
3234
4. THE action buttons SHALL stay in one compact row on desktop where width allows.
3335
5. WHEN text is long or viewport narrows THEN controls SHALL wrap or compact without overlapping.
3436

@@ -54,7 +56,7 @@ This spec is separate from the home shell spec because the composer visual and i
5456
1. WHEN clarification is active THEN a clarification surface MAY appear above the composer.
5557
2. WHEN clarification appears THEN it SHALL be temporary and clearly tied to the current command.
5658
3. WHEN clarification is not active THEN no clarification panel SHALL occupy center space.
57-
4. WHEN pending launch exists THEN status MAY be shown compactly in the composer or right drawer.
59+
4. WHEN pending launch exists THEN status MAY be shown compactly in the composer or lower support tab.
5860
5. WHEN pending launch resolves THEN focus MAY return to task context without opening a left queue drawer.
5961

6062
### Requirement 5: Test and Visual Verification
@@ -66,5 +68,7 @@ This spec is separate from the home shell spec because the composer visual and i
6668
1. THE implementation SHALL include a test asserting exactly one launch composer is rendered.
6769
2. THE implementation SHALL include a test asserting the large center autopilot panel visual role is absent by default.
6870
3. THE implementation SHALL include a test or smoke assertion for the composer action controls.
69-
4. THE implementation SHALL include desktop screenshot review after code changes.
70-
5. THE progress SVG SHALL be updated after this spec is implemented.
71+
4. THE implementation SHALL include a test asserting destination preview and route planning are not rendered inside the composer surface.
72+
5. THE implementation SHALL include a test asserting destination preview and route planning render in the lower Support tab when a draft destination exists.
73+
6. THE implementation SHALL include desktop screenshot review after code changes.
74+
7. THE progress SVG SHALL be updated after this spec is implemented.

.kiro/specs/ui-redesign-composer-only-center-input/tasks.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
## Tasks
44

5-
- [ ] 1. Lock composer-only center expectations with tests
5+
- [x] 1. Lock composer-only center expectations with tests
66
- [x] 1.1 Update `OfficeTaskCockpit.test.tsx` to assert exactly one `UnifiedLaunchComposer`.
77
- [x] 1.2 Add an assertion that the default center does not render a large autopilot guidance panel.
88
- [x] 1.3 Add or update launch tests so key composer actions remain visible.
9-
- [ ] 1.4 Run the targeted tests and confirm the large-panel absence assertion fails before implementation if the panel is still present.
9+
- [x] 1.4 Run the targeted tests and confirm the large-panel absence assertion fails before implementation if the panel is still present.
10+
- [x] 1.5 Add a launch composer test asserting destination preview and route planning are not rendered inside the composer surface.
11+
- [x] 1.6 Add an office cockpit test asserting destination preview and route planning render in the lower Support tab when a draft destination exists.
1012

1113
- [x] 2. Simplify the center composer stack
1214
- [x] 2.1 In `OfficeTaskCockpit.tsx`, keep the composer in the center-bottom launcher stage.
@@ -25,8 +27,19 @@
2527
- [x] 4.2 Verify create-task access remains present.
2628
- [x] 4.3 Verify advanced/more actions remain present.
2729
- [x] 4.4 Verify launch submission uses existing `UnifiedLaunchComposer` behavior.
30+
- [x] 4.5 Move destination preview and route planning from the composer surface into the lower Support tab without changing the launch submission path.
2831

29-
- [ ] 5. Verify composer-only center
30-
- [x] 5.1 Run `npx vitest run --pool=forks --poolOptions.forks.singleFork client/src/components/office/OfficeTaskCockpit.test.tsx client/src/components/launch/__tests__/LaunchPanelShell.test.tsx client/src/components/launch/__tests__/LaunchPanelIntegration.test.tsx`.
31-
- [ ] 5.2 Manually inspect home desktop and confirm the center shows only the compact composer over the scene.
32-
- [ ] 5.3 Update the UI progress SVG after implementation.
32+
- [x] 5. Move the support/runtime panel into the central Splitter
33+
- [x] 5.1 Add an `OfficeTaskCockpit.test.tsx` assertion that the central control Splitter exists.
34+
- [x] 5.2 Assert the control panel renders above the composer panel in markup order.
35+
- [x] 5.3 Import and use Ant Design `Splitter` for the center control area.
36+
- [x] 5.4 Move launch guidance and Support / Logs / Artifacts / Runtime tabs into the upper Splitter panel.
37+
- [x] 5.5 Keep the compact `UnifiedLaunchComposer` in the lower Splitter panel.
38+
- [x] 5.6 Remove the separate standalone bottom support/runtime panel below the composer.
39+
40+
- [ ] 6. Verify composer-centered control area
41+
- [x] 6.1 Run `npx vitest run --pool=forks --poolOptions.forks.singleFork client/src/components/office/OfficeTaskCockpit.test.tsx client/src/components/launch/__tests__/LaunchPanelShell.test.tsx client/src/components/launch/__tests__/LaunchPanelIntegration.test.tsx`.
42+
- [x] 6.2 Run `npx vitest run --pool=forks --poolOptions.forks.singleFork client/src/components/launch/__tests__/UnifiedLaunchComposer.test.ts client/src/components/office/OfficeTaskCockpit.test.tsx`.
43+
- [ ] 6.3 Manually inspect home desktop and confirm the central Splitter shows support/runtime content above the compact composer.
44+
- [ ] 6.4 Manually inspect a draft destination and confirm the central Support tab shows destination preview and route planning.
45+
- [x] 6.5 Update the UI progress SVG after implementation.

client/src/App.shell-layout.test.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ vi.mock("wouter", () => ({
2222
component: Component,
2323
path,
2424
}: {
25-
children?: React.ReactNode | ((params: Record<string, string>) => React.ReactNode);
25+
children?:
26+
| React.ReactNode
27+
| ((params: Record<string, string>) => React.ReactNode);
2628
component?: React.ComponentType;
2729
path?: string;
2830
}) => {
@@ -128,8 +130,8 @@ describe("AppShell fixed sidebar layout", () => {
128130

129131
expect(markup).toContain('data-testid="app-sidebar"');
130132
expect(markup).toContain('data-testid="tasks-page"');
131-
expect(shell).toContain("--sidebar-width:240px");
132-
expect(shell).toContain("padding-left:240px");
133+
expect(shell).toContain("--sidebar-width:248px");
134+
expect(shell).toContain("padding-left:248px");
133135
});
134136

135137
it("does not offset the home page because it uses embedded scene chrome", () => {

client/src/App.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ function Router() {
4343
<Route path={"/command-center/legacy"}>
4444
{() => <LegacyCommandCenterPage />}
4545
</Route>
46-
<Route path={"/command-center"}>
47-
{() => <RedirectRoute to="/" />}
48-
</Route>
46+
<Route path={"/command-center"}>{() => <RedirectRoute to="/" />}</Route>
4947
<Route path={"/lineage"} component={LineagePage} />
5048
<Route path={"/404"} component={NotFound} />
5149
<Route component={NotFound} />
@@ -118,7 +116,7 @@ export function AppShell() {
118116
setSidebarCollapsed(isTablet);
119117
}, [isTablet]);
120118

121-
const sidebarWidth = isMobile ? 0 : sidebarCollapsed ? 64 : 240;
119+
const sidebarWidth = isMobile ? 0 : sidebarCollapsed ? 64 : 248;
122120

123121
return (
124122
<>

0 commit comments

Comments
 (0)