Skip to content

PE-9205: A drive's details beside Your Drives - #2234

Open
vilenarios wants to merge 1 commit into
select-then-openfrom
drive-info-panel
Open

vilenarios wants to merge 1 commit into
select-then-openfrom
drive-info-panel

Conversation

@vilenarios

Copy link
Copy Markdown
Collaborator

Stacked on #2233. It builds on click-to-highlight, and targets that branch until #2233 merges.

A click on a drive in Your Drives now opens its details on the right, as a click on a row in a drive already does. A double-click still opens the drive, and clicking a drive still never syncs it.

What you see

Synced drive Never synced here
Drive ID, last updated, created, signature type
Size and contents "Never synced", a line saying why, and Sync Now
Share, rename, hide
Download Not offered, since none of its files are known
Close X, or Escape X, or Escape

Sync Now is an explicit press, doing what the drive's own menu does. Opening the details syncs nothing.

Room for it

The panel is the explorer's, at the explorer's width: a quarter of the window, never under 375px.

  • Pushes the list while the list can keep its rows as rows. Beside the panel the list may drop to three columns (name, last synced, size). The two it drops, files and created, are what the panel shows.
  • Covers the right of the list where even three columns won't fit. Pushing there would turn rows into cards, which are taller, so every row would move under the pointer between the two clicks of a double-click.
Window Result
1920 Pushes, all five columns stay
1440, 1280 Pushes, three columns
1200, 1100 Covers

The list stays at one place in the widget tree in every case, so opening the panel never rebuilds a row, and a double-click survives it.

Fixed on the way, in the explorer too

  • More Info on a never-synced drive spun forever. The Details tab asked for the root folder's revision with getSingle, which threw inside a stream listener where no onError hears it. It now shows what is known, and a load that fails ends on a message instead of a spinner.
  • The explorer's panel for an unsynced drive had no close button. Its toolbar only drew for a loaded drive. It now closes, and offers Sync Now.
  • The toolbar can't act on the wrong drive. It used to read the explorer's state. Your Drives keeps that state alive holding the last drive you opened, so a panel beside the list would have offered to share and rename the wrong drive. It now takes the drive it's given.

Testing

  • 17 new tests. The info cubit and the panel run against a real in-memory database. The list is tested beside the panel. The push-or-cover decision is tested at the five widths above.
  • Eight mutations, each breaking one rule, are each caught by a failing assertion, not a compile error.
  • The full suite is 2,204 passing, and flutter analyze is clean.

Please check on the preview

  1. Your Drives: click a drive. Its details slide in on the right, and the row highlights. Click another drive and the panel switches. Press Escape or click the X: it closes, and the highlight goes.
  2. A never-synced drive: "Never synced" appears where the size goes, with Sync Now. Nothing syncs until you press it.
  3. At a laptop width, the list keeps three columns beside the panel. Narrow the window and the panel covers the list instead.
  4. Double-click a drive: it opens, panel or not.
  5. In a drive, ⋯ → More Info on a never-synced drive: details and a close button, not a spinner.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ShVJiUhdRWk35ZWbP3sZyN

A click on a drive in Your Drives now opens its details on the right, the
same way a click on a row in a drive does. A double-click still opens the
drive, and clicking a drive still never syncs it.

The panel is the explorer's own `DetailsPanel`, not a lookalike:

- It takes the drive, its close and its sync as parameters.
- Its toolbar is built from the drive it is given, not read off the
  explorer's state. Your Drives keeps that explorer alive holding whichever
  drive was last open, so a panel reading it would offer to share and rename
  the wrong drive.

**Drives never synced here.** Reading the drive list stores each drive and a
placeholder root folder, and nothing else. For such a drive the Details tab
asked for the root folder's revision with `getSingle`. That threw inside a
stream listener, where no `onError` hears it, and the panel spun forever.
Every More Info on a never-synced drive did this. Now:

- `FsEntryUnsyncedDriveInfo` shows what is known: the drive's ID, its
  dates and its signature type.
- Where the size and contents would be, it says the drive has not been
  synced on this device, and offers Sync Now. The press is the reader's; opening
  the details syncs nothing.
- There is no Download, since none of its files are known.
- A load that fails ends on a message, not a spinner.

The explorer's own panel for an unsynced drive gets the same fixes, and a
close button: its toolbar only drew for a loaded drive, so nothing closed it.

**Room for the panel.** It pushes the list narrower, as the explorer's does,
while the list can keep its rows as rows:

- **Three columns.** Beside the panel the list may drop to name, last synced
  and size. The two it drops, files and created, are what the panel shows.
- **Covering.** Where even three will not fit, the panel covers the right of
  the list instead. Pushing would turn the rows into cards, which are taller,
  and every row would move under the pointer between the two clicks of a
  double-click. `driveDetailsPushList` makes the call, and it is tested at
  1920, 1440, 1280, 1200 and 1100 wide.
- **Nothing rebuilt.** The list sits at one place in the tree whichever it
  is, so opening the panel rebuilds no row.

The panel follows focus, so Tab moves it from drive to drive. Escape or the
X closes it, and the row's highlight goes with it. A click on the row whose
details were just closed reopens them, even though that row still had focus.

Verification:

- 17 new tests: the info cubit against a real database, the panel with a
  real database, the list beside it, and the push-or-cover decision.
- Eight mutations, each breaking one rule, are each caught.
- The full suite is 2,204 passing, and `flutter analyze` is clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShVJiUhdRWk35ZWbP3sZyN
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 66bd032d-a5ce-4560-81bf-25e5df193173

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 847cad5):

https://ardrive-web--pr2234-drive-info-panel-efint1xw.web.app

(expires Fri, 25 Sep 2026 15:27:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a224ebaee2f0939e7665e7630e7d3d6cd7d0f8b0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant