dzen.nstarikov.ru/dzen-assistant/docs/superpowers/plans/2026-08-15-dashboard-video-upload-layout.md

2.9 KiB

Dashboard Video Upload Layout Implementation Plan

For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Place local-file upload next to URL import and place disk capacity across the dashboard above the work columns.

Architecture: Move existing JSX sections without changing their state, handlers or API calls. The existing .command-row owns the two methods of adding a video; a new full-width storage section sits directly before workspace-grid.

Tech Stack: React 19, TypeScript, Tailwind CSS, Vite.


Task 1: Recompose the dashboard regions

Files:

  • Modify: admin/src/App.tsx:2267-2406

  • Step 1: Capture the existing placement

At desktop width, confirm that URL import is above the workspace while local upload and disk capacity are nested in the scrollable «Ролики» card.

  • Step 2: Move the existing local upload section to command-row

Move the complete <section className="local-video-upload …"> with its hidden input, refs, drag events, upload state and progress UI to be the second child of .command-row, immediately after the URL import <form>. Do not change uploadLocalVideo, selectLocalVideo, cancelLocalVideoUpload, or their state.

  • Step 3: Make disk capacity a full-width dashboard region

Move the existing Видео на диске <section> out of CardContent.work-list and render it immediately after .command-row and before <section className="workspace-grid …">. Preserve videoStorage, videoStorageLow, the progress percentage, aria-live and all warning styles.

  • Step 4: Remove the obsolete nested two-column wrapper

Delete the inner grid gap-2 xl:grid-cols-[minmax(0,1fr)_13rem] that previously coupled local upload and storage inside the video list. Keep video cards as direct list children so scrolling only affects the list.

  • Step 5: Build and check responsive order

Run:

npm run build --prefix admin

Expected: TypeScript and Vite build successfully. Inspect 390 px and desktop: mobile order is URL, local file, disk capacity, videos, drafts; at lg width URL and local file are side by side; capacity spans the workspace width.

  • Step 6: Run detector and commit

Run:

node /Users/dima/.agents/skills/impeccable/scripts/detect.mjs --json --scope layout admin/src/App.tsx
git diff --check

Expected: detector findings are [] and diff check has no output.

git add admin/src/App.tsx
git commit -m "fix: reorganize video upload dashboard"

Plan review

  • The plan covers exact requested placement and keeps all data/API behavior unchanged.
  • It does not add components, CSS, routes, state or dependencies because the current lg:grid-cols-2 command row already provides the intended responsive behavior.