Skip to content

Dev - #12

Merged
ZhuchkaTriplesix merged 13 commits into
mainfrom
dev
Mar 8, 2026
Merged

Dev#12
ZhuchkaTriplesix merged 13 commits into
mainfrom
dev

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

No description provided.

ZhuchkaTriplesix and others added 13 commits March 6, 2026 00:03
Replace regex-based URI manipulation with Uri.parse() and uri.replace()
to correctly handle database path replacement. This fixes the bug where
\ was interpreted as a literal string instead of a regex capture group,
causing errors like 'Could not connect to admin\'.

- mongodb_connection.dart: Use Uri.parse() in listDatabases() and listCollections()
- mongodb_service.dart: Use Uri.parse() in executeCommand(), find(), and aggregate()
- Preserves query parameters (authSource, replicaSet, ssl) when replacing database
Create MongoStatsView widget that displays MongoDB server statistics
in a card-based UI similar to RedisView. Features:
- Auto-refresh every 3 seconds
- Summary chips (Version, Uptime, Connections, Queries)
- Memory, Operations, Connections, Network cards
- Server, Storage, Replication, WiredTiger sections
- Safe connection management with proper cleanup on dispose
Update workspace_panel to display MongoStatsView instead of MongoDatabasesView
when a MongoDB connection is selected, providing server statistics similar
to Redis connections.
Add unit tests to verify correct database path replacement in MongoDB URIs:
- Replaces database in URI without existing database
- Replaces database in URI with existing database
- Preserves query parameters (authSource, replicaSet, ssl)
- Handles various URI formats (with/without auth, custom ports, connection strings)
- Ensures no literal \ appears in final URI (the bug we fixed)
- Fix critical bug where database path replacement used regex incorrectly,
  causing literal '' to appear in connection URIs
- Replace regex-based URI manipulation with Uri.parse() and uri.replace()
  for reliable path replacement while preserving query parameters
- Update workspace_panel to use MongoStatsView for MongoDB connections
- Update .flutter-plugins-dependencies
Fix MongoDB URI database replacement bug and update workspace panel
…base() with auto authSource injection - reuse parent connection in MongoDatabasesView to prevent disconnection - refactor mongodb_service to use _withDb helper consistently - update URI replacement tests for authSource scenarios
…s button (bar_chart icon) next to refresh in breadcrumb bar - MongoStatsView reuses parent connection, shows Explorer back button - seamless switching between data browsing and server statistics
…panel: ellipsis on long name/host text - folder name: ellipsis on overflow - document cards: show only keys when collapsed, full JSON when expanded - disable horizontal scroll on collapsed document preview
…to ensure TextOverflow.ellipsis works - shadcn extensions (.small()/.muted()) were wrapping and losing overflow
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Mar 8, 2026
@ZhuchkaTriplesix ZhuchkaTriplesix added bug Something isn't working enhancement New feature or request labels Mar 8, 2026

@ZhuchkaTriplesix ZhuchkaTriplesix left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

legend coding

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit bf80659 into main Mar 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants