Skip to content

PE-8183: snapshots for extensions#2044

Open
vilenarios wants to merge 6 commits intodevfrom
PE-8183-snapshots-for-extensions
Open

PE-8183: snapshots for extensions#2044
vilenarios wants to merge 6 commits intodevfrom
PE-8183-snapshots-for-extensions

Conversation

@vilenarios
Copy link
Copy Markdown
Collaborator

@vilenarios vilenarios commented Jun 17, 2025

@github-actions
Copy link
Copy Markdown

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

@fedellen fedellen self-requested a review June 19, 2025 20:11
@github-actions
Copy link
Copy Markdown

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

@github-actions
Copy link
Copy Markdown

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

Comment thread lib/blocs/drive_attach/drive_attach_cubit.dart
Comment on lines 35 to 37

foldersInFolder ($order = ''):
foldersInFolder:
SELECT * FROM folder_entries
WHERE driveId = :driveId AND parentFolderId = :parentFolderId
ORDER BY $order;
WHERE driveId = :driveId AND parentFolderId = :parentFolderId;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does order disappear in these DB queries?

Comment thread lib/components/drive_attach_form.dart
Comment thread lib/blocs/drive_attach/drive_attach_cubit.dart
Comment on lines +207 to +215
// Give the UI time to show the syncing state before allowing the user to close
await Future.delayed(const Duration(seconds: 2));

// Check if still in syncing state (user hasn't closed the modal)
if (!isClosed && state is DriveAttachSyncing) {
/// Emit success to indicate the attach is complete
/// The sync continues in the background
emit(DriveAttachSuccess());
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fishy here, wondering if is there a chance we leave the user stuck

Comment on lines +613 to +626

// If no snapshots found and we have an owner address, try owner-specific search
if (snapshotItems.isEmpty && ownerAddress.isNotEmpty) {
logger.d('No general snapshots found, trying owner-specific for ${drive.id}');
final ownerSnapshotsStream = _arweave.getAllSnapshotsOfDrive(
driveId,
lastBlockHeight,
ownerAddress: ownerAddress,
);

snapshotItems = await SnapshotItem.instantiateAll(
ownerSnapshotsStream,
arweave: _arweave,
).toList();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont see how this flow is possible. if we don't find snapshots for ALL owners, why would we find snapshots from this owner?

@github-actions
Copy link
Copy Markdown

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

@github-actions
Copy link
Copy Markdown

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

@github-actions
Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 7d27d3e):

https://ardrive-web--pr2044-pe-8183-snapshots-fo-jvslg1ie.web.app

(expires Wed, 02 Jul 2025 20:52:10 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a224ebaee2f0939e7665e7630e7d3d6cd7d0f8b0

@vilenarios vilenarios changed the title Pe 8183 snapshots for extensions PE-8183: snapshots for extensions Jun 25, 2025
Comment on lines +180 to +186
// Process in chunks to avoid memory issues with large datasets
const chunkSize = 100;
for (var i = 0; i < revisions.length; i += chunkSize) {
final end = (i + chunkSize < revisions.length)
? i + chunkSize
: revisions.length;
final chunk = revisions.sublist(i, end);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getting some longer loads on my big drive. this area might be the cause. wonder if we tweak the chunkSizes?

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.

2 participants