Skip to content

feat: polish delivery and content workflows - #373

Merged
mira-2026 merged 2 commits into
mainfrom
mira/dashboard-polish-393
Aug 3, 2026
Merged

feat: polish delivery and content workflows#373
mira-2026 merged 2 commits into
mainfrom
mira/dashboard-polish-393

Conversation

@mira-2026

@mira-2026 mira-2026 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add reliable spacing between Moltbook content tabs, feed sorting, and results
  • show PR dev availability with semantic status color and put dev controls before review actions
  • refresh the scrubbed production database snapshot whenever a PR preview is started or rebuilt
  • close Merge and Merge + Deploy confirmations immediately, scroll Delivery to the top, and show in-page progress while the job runs
  • add a shared clipboard control to chat code blocks and code, JSON, and Markdown previews

Behavior and regression coverage

  • Moltbook now keeps a 16 px responsive gap between the content tabs and the feed controls instead of letting the tab group's zero margin collapse the spacing; the page behavior test protects the wrapper structure.
  • An available PR dev preview uses the same green success treatment as other available states, and Run/Stop dev is rendered before Approve/Update branch; card tests cover the state mapping and action order.
  • Starting or rebuilding a PR preview now replaces its database with a fresh, scrubbed production snapshot. Development-state tests cover replacement, stale SQLite sidecar removal, atomic refresh, and rejection of symlinked targets/sidecars.
  • Merge and Merge + Deploy confirmation dialogs close after validation, Delivery scrolls to the top, and progress remains visible while the request runs. A delayed-response regression test verifies the modal does not stay open.
  • Chat code blocks and Files/chat attachment previews for code, JSON, and Markdown expose a clipboard action with accessible success/failure feedback. Component tests cover both clipboard success and unavailable-clipboard failure.
  • Existing code-preview line numbers are retained. The current interactive JSON tree package does not expose JSON line-number support, so JSON gains whole-source copy without replacing the established viewer.

Verification

  • Repository lint: bun run lint
  • Repository formatting: bun run format:check
  • Frontend build: TypeScript application check plus bun scripts/buildFrontend.ts
  • Frontend tests/coverage: full CI suite and patch coverage passed; affected suites and targeted CopyButton coverage also passed locally
  • Backend build: passed on the final backend source diff
  • Backend tests/coverage: full CI suite and patch coverage passed; targeted development-state coverage also passed locally
  • Focused regression tests: 98 affected frontend tests and 21 affected backend tests, plus the final Moltbook and refresh-safety regression reruns
  • Manual UI/API smoke check: isolated dev server confirmed the 16 px Moltbook gap and visible Markdown/JSON copy controls

Risk checklist

  • No secrets, tokens, .env files, database dumps, or runtime state committed
  • Auth, Gateway, terminal, file, Docker, or settings changes were reviewed carefully; the preview snapshot remains scrubbed and no auth behavior changed
  • No new or changed API routes
  • No migrations or persistent data-shape changes; this only refreshes the disposable PR-preview snapshot
  • Runtime/reconnect behavior preserves ordering, idempotency, and recovery; the preview is stopped before atomic snapshot replacement
  • UI changes are described above and were smoke-tested in the isolated dev environment

Deployment / operations

  • No deploy/restart needed
  • Deploy/restart needed after merge: normal Dashboard web and worker deployment
  • No config or secrets changes needed
  • Rollback path verified: redeploy the previous immutable Dashboard release or revert this PR; no migration rollback is required

Notes for reviewers

@mira-2026
mira-2026 requested a review from rajohan as a code owner August 2, 2026 18:18
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added copy controls to chat code blocks and JSON, code, and Markdown previews.
    • Added progress messaging for merge and merge-deploy actions, including status scrolling and disabled controls during execution.
    • Refreshed development database snapshots when preparing pull request previews.
    • Improved preview status badges and pull request action placement.
    • Grouped Moltbook feed controls and posts for clearer layout.
  • Bug Fixes

    • Improved preview scrolling and toolbar layouts.
    • Added coverage for clipboard copying, merge progress behavior, and refreshed preview data.

Walkthrough

The PR adds refreshable development database snapshots for previews, introduces shared copy controls across content views, and adds merge progress feedback with related delivery layout updates and tests.

Changes

Development database snapshot refresh

Layer / File(s) Summary
Snapshot refresh contract and preparation
backend/src/development/developmentState.ts
prepareDevelopmentState accepts refresh options, validates database paths, refreshes snapshots when requested, and removes valid SQLite sidecar files before replacement.
Preview refresh wiring and validation
backend/src/services/pullRequestPreviews/sandbox.ts, backend/test/developmentStack.test.ts, backend/test/pullRequestPreview.test.ts
Preview preparation requests database snapshot refreshes. Tests verify refreshed source data, reused releases and workspace, and the preview startup argument.

Shared copy controls

Layer / File(s) Summary
CopyButton behavior
frontend/src/components/ui/CopyButton.tsx
Adds clipboard copying with configurable content, labels, variants, and copied or failed status feedback.
Copy controls in content viewers
frontend/src/components/features/chat/ChatMarkdown.tsx, frontend/src/components/features/database/TopQueriesTable.tsx, frontend/src/components/features/files/viewers/*
Adds copy controls to chat code blocks, database queries, code previews, JSON previews, and Markdown previews.
Clipboard interaction tests
frontend/src/test/componentBehavior.test.tsx
Verifies copied content for each supported viewer through mocked Clipboard API writes.

Delivery progress and preview controls

Layer / File(s) Summary
Merge progress state and presentation
frontend/src/components/features/delivery/useDeliveryController.ts, frontend/src/pages/Delivery.tsx, frontend/src/test/pageBehavior.test.tsx
Merge actions expose progress text, remain pending during mutations, scroll the page to the progress message, and clear progress after completion.
Preview controls and status presentation
frontend/src/components/features/delivery/PullRequestActions.tsx, frontend/src/components/features/delivery/PullRequestDevelopmentCard.tsx, frontend/src/test/pageBehavior.test.tsx, frontend/src/test/pullRequestDevelopmentCard.test.tsx
Moves preview controls after the preview status and updates stopped and available preview status presentation with corresponding layout assertions.

Moltbook feed layout

Layer / File(s) Summary
Feed spacing container
frontend/src/pages/Moltbook.tsx, frontend/src/test/pageBehavior.test.tsx
Wraps feed controls and posts in a spaced container and tests their separated layout.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Delivery
  participant useDeliveryController
  participant MergeMutation
  Delivery->>useDeliveryController: Confirm merge action
  useDeliveryController->>Delivery: Set progress and pending state
  useDeliveryController->>MergeMutation: Execute mutation
  MergeMutation-->>useDeliveryController: Return result
  useDeliveryController->>Delivery: Clear progress
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the delivery and content workflow improvements, although it does not identify each specific feature.
Description check ✅ Passed The description follows the template and documents changes, regression coverage, verification, risks, deployment, rollback, and reviewer focus.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mira-2026 mira-2026 added area: backend Backend API, server routes, services, and integrations area: chat Chat UI, streaming, messages, attachments, or voice UX area: database Database dashboard, Postgres, PgBouncer, or query views area: files File explorer, editor, previews, or uploads area: frontend Frontend UI, client state, routing, and browser behavior priority: high High-priority work for the next active cycle status: needs-review Ready for human or agent review type: feature Adds user-visible functionality labels Aug 2, 2026
@mira-2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 0d35c42966

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@mira-2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 0d8669e1e0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@mira-2026
mira-2026 merged commit 744d0ed into main Aug 3, 2026
7 checks passed
@mira-2026
mira-2026 deleted the mira/dashboard-polish-393 branch August 3, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backend Backend API, server routes, services, and integrations area: chat Chat UI, streaming, messages, attachments, or voice UX area: database Database dashboard, Postgres, PgBouncer, or query views area: files File explorer, editor, previews, or uploads area: frontend Frontend UI, client state, routing, and browser behavior priority: high High-priority work for the next active cycle status: needs-review Ready for human or agent review type: feature Adds user-visible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants