feat: 自动更新
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
schema: spec-driven
|
||||
created: 2026-07-14
|
||||
@@ -0,0 +1,18 @@
|
||||
## Why
|
||||
|
||||
The server management card action menu currently opens inside the card as a large vertical command stack, which obscures operational data and makes the card feel broken. The same card stat tiles render label/value text over busy translucent materials, so placeholder values such as `--` and labels like 玩家, TPS, 延迟, and 任务 lose contrast against uploaded or magical-girl backgrounds.
|
||||
|
||||
## What Changes
|
||||
|
||||
- Replace the in-card runtime action stack with a compact anchored overlay that does not resize or reflow server cards.
|
||||
- Keep runtime actions platform-mediated and unchanged while closing the overlay on outside click, Escape, and action selection.
|
||||
- After an operator selects a runtime action, show a modal task flow with stage progress for code pull, environment install/check, dependency download, compile/build, packaging, queued jobs, and final success/failure.
|
||||
- Increase server card stat readability with stronger token-driven material, label contrast, value contrast, and text shadow that works across black mecha, magical-girl, and uploaded backgrounds.
|
||||
- Remove misleading whole-card pointer affordance so only actual controls look clickable.
|
||||
|
||||
## Impact
|
||||
|
||||
- Affected root: `platform_web/`.
|
||||
- Expected files: `platform_web/pages/ServersPage.tsx`, `platform_web/pages/ServerDetailPage.tsx`, `platform_web/components/RuntimeTaskProgress.tsx`, `platform_web/theme/base.css`, and focused rendering/style contract tests if useful.
|
||||
- No platform, run, plugin, lifecycle, authorization, credential, or API behavior changes.
|
||||
- Verification: focused frontend tests/typecheck, `scripts/check-structure.sh`, `openspec validate fix-server-card-action-menu --strict`, and browser walkthrough of 服务器管理.
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Server cards use compact runtime action overlays
|
||||
|
||||
The platform_web server management page SHALL expose server-card runtime actions through a compact anchored overlay that does not resize, stretch, or reflow the server card.
|
||||
|
||||
#### Scenario: Operator opens runtime actions from a server card
|
||||
|
||||
- **WHEN** an operator selects the 运行操作 trigger on a server card
|
||||
- **THEN** runtime actions MUST appear in a compact overlay anchored near the trigger instead of as a tall in-card vertical command stack
|
||||
- **AND** the server card layout, neighboring cards, metrics, progress bars, title, and status badge MUST remain structurally stable
|
||||
|
||||
#### Scenario: Operator dismisses runtime actions
|
||||
|
||||
- **WHEN** the runtime action overlay is open
|
||||
- **THEN** outside click, Escape, and selecting an action MUST dismiss the overlay
|
||||
- **AND** the action dispatch MUST continue to use the existing platform-mediated runtime APIs
|
||||
|
||||
### Requirement: Runtime actions show task progress dialogs
|
||||
|
||||
The platform_web server management and server detail runtime action surfaces SHALL show a modal task flow after an operator selects a runtime action so the operator can see meaningful progress instead of a silent click-and-finish interaction.
|
||||
|
||||
#### Scenario: Operator generates a run package
|
||||
|
||||
- **WHEN** an operator selects 生成 run for a server
|
||||
- **THEN** platform_web MUST open a modal task dialog that shows stage progress for code pull, environment install/check, dependency download, compile/build, package finalization, and terminal success or failure
|
||||
- **AND** the dialog MUST include a readable progress meter, current stage, recent task log lines, and final artifact/job summary when the platform API returns
|
||||
|
||||
#### Scenario: Operator starts a queued runtime maintenance action
|
||||
|
||||
- **WHEN** an operator selects dependency check, dependency install, push update, live logs, or historical logs from the runtime action surfaces
|
||||
- **THEN** platform_web MUST show a modal task dialog with action-specific staged progress and final queued job or navigation status
|
||||
- **AND** the dialog MUST keep sensitive runtime credentials, raw host paths, direct sockets, and secret material hidden
|
||||
|
||||
### Requirement: Server card metrics remain readable over themed backgrounds
|
||||
|
||||
Server card metric tiles SHALL keep labels and values readable across black mecha, magical-girl, and uploaded-background states.
|
||||
|
||||
#### Scenario: Metrics are unavailable or pending
|
||||
|
||||
- **WHEN** 玩家, TPS, 延迟, or 任务 values render as pending or unavailable placeholders such as `…` or `--`
|
||||
- **THEN** both the label and value text MUST remain legible over the card background and selected workspace background
|
||||
|
||||
#### Scenario: Custom background is active
|
||||
|
||||
- **WHEN** an uploaded background is active behind server cards
|
||||
- **THEN** metric tiles MUST use stronger surface material, borders, and text contrast so operational data is not visually swallowed by the background image
|
||||
@@ -0,0 +1,31 @@
|
||||
## 1. Server Card Interaction Fix
|
||||
|
||||
- [x] 1.1 Replace the `<details>` runtime action stack with a compact overlay that is anchored to the trigger and does not reflow the card.
|
||||
- [x] 1.2 Close the overlay on outside click, Escape, and action selection.
|
||||
- [x] 1.3 Keep runtime action dispatch semantics unchanged.
|
||||
- [x] 1.4 Show a runtime task progress dialog after action selection with staged progress, logs, and terminal success/failure state.
|
||||
- [x] 1.5 Reuse the same progress dialog from server detail runtime distribution actions.
|
||||
|
||||
## 2. Server Card Readability Fix
|
||||
|
||||
- [x] 2.1 Strengthen `.server-card-stat` label/value contrast for 玩家, TPS, 延迟, 任务, and placeholder values.
|
||||
- [x] 2.2 Preserve the shared black-mecha / magical-girl console visual system and uploaded-background readability.
|
||||
- [x] 2.3 Remove misleading whole-card click affordance while keeping explicit detail/menu controls.
|
||||
|
||||
## 3. Verification
|
||||
|
||||
- [x] 3.1 Run focused frontend tests and typecheck.
|
||||
- [x] 3.2 Run `scripts/check-structure.sh`.
|
||||
- [x] 3.3 Run `openspec validate fix-server-card-action-menu --strict`.
|
||||
- [ ] 3.4 Browser-walkthrough 服务器管理 and verify the menu is compact, card stats are readable, action selection opens the progress dialog, and no metrics/progress/status are covered.
|
||||
|
||||
## Evidence
|
||||
|
||||
- `npm run typecheck` passed.
|
||||
- `npm test -- ConsolePages.test.tsx ServerDetailPage.test.tsx base-css.test.js` passed with 22 tests.
|
||||
- `npm test` passed with 68 tests.
|
||||
- `npm run build` passed.
|
||||
- `go test ./api ./service -run 'Test.*(Run|Distribution|Artifact|ClientManager|Runtime)' -count=1` passed from `platform/`, proving backend run distribution, artifact download, update, and client-manager paths are implemented.
|
||||
- `scripts/check-structure.sh` passed with `structure check passed`.
|
||||
- `openspec validate fix-server-card-action-menu --strict` passed. OpenSpec telemetry flush failed with `ENOTFOUND edge.openspec.dev`, which did not affect validation.
|
||||
- Browser walkthrough is still pending because the Browser plugin reported no available browser backends (`agent.browsers.list()` returned `[]`).
|
||||
Reference in New Issue
Block a user