mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #745] [MERGED] feat(connections): add folders for organising API connections #4758
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4758
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/745
Author: @Romuromylus
Created: 5/12/2026
Status: ✅ Merged
Merged: 5/12/2026
Merged by: @Romuromylus
Base:
main← Head:fix/connection-folders📝 Commits (3)
cc4e664feat(connections): add folders for organising API connectionsbe2f6a7fix(connections): register api_connection_folders in file-backed storec2b789aMerge branch 'main' into fix/connection-folders📊 Changes
11 files changed (+779 additions, -100 deletions)
View changed files
📝
packages/client/src/components/panels/ConnectionsPanel.tsx(+474 -100)➕
packages/client/src/hooks/use-connection-folders.ts(+75 -0)📝
packages/server/src/db/file-backed-store.ts(+1 -0)📝
packages/server/src/db/migrate.ts(+19 -0)➕
packages/server/src/db/schema/connection-folders.ts(+14 -0)📝
packages/server/src/db/schema/connections.ts(+4 -0)📝
packages/server/src/db/schema/index.ts(+1 -0)➕
packages/server/src/routes/connection-folders.routes.ts(+86 -0)📝
packages/server/src/routes/index.ts(+2 -0)➕
packages/server/src/services/storage/connection-folders.storage.ts(+88 -0)📝
packages/shared/src/types/connection.ts(+15 -0)📄 Description
Linked issue
Closes #686
Why this change
Users with many connections (ComfyUI workflow variants, OpenRouter / NanoGPT model sets, etc.) currently see a flat scrollable list in the Connections panel. The reporter asked for a folder system mirroring the chat-folder UX. Triage labelled it
normal-scopeand suggested reusing the app's existing folder-style interaction model, starting with the smallest first slice — which is what this PR does.What changed
api_connection_folders(id, name, color, sort_order, collapsed, timestamps), created via the idempotent runtime migrator inpackages/server/src/db/migrate.ts.api_connectionstable gains nullablefolder_idandsort_ordercolumns. Pure additiveALTER TABLE ADD COLUMNmigrations — safe on existing installs, zero impact on connection selection / generation / agent code paths.connection-folders.storage.ts(CRUD + reorder + move) andconnection-folders.routes.tsmounted at/api/connection-foldersforGET /,POST /,PATCH /:id,DELETE /:id,POST /reorder,POST /move-connection,POST /reorder-connections.APIConnectiongainsfolderId: string | nullandsortOrder: number; newConnectionFoldertype.use-connection-folders.tsReact Query hook module;ConnectionsPanel.tsxnow renders folders above the unfiled list with the sameFolderRowUX pattern used by chat folders (drag-to-reorder, expand/collapse, rename, delete). Each connection row gains a "Move to folder" pill action when at least one folder exists.colorcolumn is reserved so a small follow-up can add the picker without another schema change.Out-of-scope for this PR (deferred to follow-ups): drag-to-reorder within a folder, batch multi-select move, color picker UI, per-folder default connection.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Docs and release impact
UI evidence (if applicable)
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.