Skip to content

Shashwat/storage migration#1695

Open
ShashwatXD wants to merge 35 commits into
foss42:mainfrom
ShashwatXD:shashwat/storageMigration
Open

Shashwat/storage migration#1695
ShashwatXD wants to merge 35 commits into
foss42:mainfrom
ShashwatXD:shashwat/storageMigration

Conversation

@ShashwatXD

@ShashwatXD ShashwatXD commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Storage migration to file system.

Added

  • Filesystem-based workspaces (collections/, environments/, history/ as JSON)
  • Multi-collection catalog with active collection providers
  • Autosave support (removed need for manual saves)
  • Workspace picker with recent workspaces
  • Secure storage for secrets and AI keys
  • Media response bodies stored as sidecar files
  • Storage and workspace tests

Removed

  • Hive persistence (hive_services)
  • Sidebar Save button (and its associated test)

@ShashwatXD

Copy link
Copy Markdown
Contributor Author

@animator Please review this PR.

@ShashwatXD ShashwatXD force-pushed the shashwat/storageMigration branch from da9377a to 6916394 Compare July 14, 2026 13:39
Comment on lines +345 to +347
final requestDirPath = _path(_requestDirRelative(collectionId, id));
merged['httpResponseModel'] =
_inlineResponseBodyFile(requestDirPath, responseJson);

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.

are we doing any validations on the filenames if they're coming from the responseJson directly?
if these workspaces can be imported and shared via git and what not then certain relative paths and stuff might be able to cause unintended effects.
lmk if this is handled

Comment thread pubspec.yaml
fvp: ^0.35.2
highlight: ^0.7.0
highlighter: ^0.1.1
hive_ce_flutter: ^2.3.4

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.

minor: pubspec.lock still contains

 hive_ce_flutter:
    dependency: "direct main"
    description:
      name: hive_ce_flutter
      sha256: "2677e95a333ff15af43ccd06af7eb7abbf1a4f154ea071997f3de4346cae913a"
      url: "https://pub.dev"
    source: hosted
    version: "2.3.4"

maybe you missed doing pub get and then adding lockfile also to changes?

Comment on lines +26 to +30
if (kIsDesktop)
const Expanded(
child: WorkspaceDropdown(),
),
if (kIsDesktop) kHSpacer4,

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.

nitpick: could be put in a spread ... [...] i guess

Comment on lines +5 to +14
Future<String?> resolveWorkspaceRoot({
required bool useDesktopPath,
String? desktopPath,
}) async {
if (useDesktopPath) {
if (desktopPath == null || desktopPath.isEmpty) {
return null;
}
return desktopPath;
}

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 do we have useDesktopPaht and desktopPath both?
like if desktopPath is non-null cant we assume that we must use it?

Comment on lines +15 to +17
static bool _shouldShowEnvironmentMenu(String environmentId) {
return environmentId != kGlobalEnvironmentId;
}

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.

nitpick: could have been inlined, no need for separate function

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