[PR #272] [MERGED] feat: add flow-scoped file uploads #287

Closed
opened 2026-06-06 22:10:03 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vxcontrol/pentagi/pull/272
Author: @mason5052
Created: 4/19/2026
Status: Merged
Merged: 4/23/2026
Merged by: @asdek

Base: feature/next-releaseHead: codex/issue-193-flow-file-uploads-v1


📝 Commits (2)

  • 4d7c367 feat: add flow-scoped file uploads
  • 263eaf5 fix: harden flow file uploads

📊 Changes

6 files changed (+842 additions, -0 deletions)

View changed files

📝 backend/pkg/server/response/errors.go (+7 -0)
📝 backend/pkg/server/router.go (+13 -0)
backend/pkg/server/services/flow_files.go (+371 -0)
backend/pkg/server/services/flow_files_test.go (+130 -0)
frontend/src/features/flows/files/flow-files.tsx (+312 -0)
📝 frontend/src/features/flows/flow-tabs.tsx (+9 -0)

📄 Description

Summary

This PR adds a small v1 slice of flow-scoped file uploads.

Problem

Issue #193 asks for files that can be attached to a flow and then shared across the flow runtime. PentAGI already gives each flow a shared /work directory, but there was no UI or API path for users to place files into that workspace.

Solution

This PR adds a minimal flow files vertical:

  • a backend REST surface to list, upload, and download user-uploaded files for a flow
  • storage under the existing flow workspace at /work/uploads
  • a new Files tab in the flow UI with upload, refresh, filter, download, and copy-path actions
  • focused backend tests for filename sanitization and filesystem listing behavior

This intentionally does not try to solve archive/export/delete lifecycle yet. It keeps the change small and reviewable while making uploaded files immediately available to automation, assistants, and container commands in the same flow.

User Impact

Users can now upload files directly from a flow page and reference them inside the flow runtime at /work/uploads/<filename>. That makes it practical to seed a flow with wordlists, configs, notes, or other local inputs without adding a broader asset platform first.

Test Plan

  • go test ./pkg/server/services -run FlowFile
  • npx eslint src/features/flows/flow-tabs.tsx src/features/flows/files/flow-files.tsx
  • npx tsc --noEmit
  • git diff --check

Refs #193


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vxcontrol/pentagi/pull/272 **Author:** [@mason5052](https://github.com/mason5052) **Created:** 4/19/2026 **Status:** ✅ Merged **Merged:** 4/23/2026 **Merged by:** [@asdek](https://github.com/asdek) **Base:** `feature/next-release` ← **Head:** `codex/issue-193-flow-file-uploads-v1` --- ### 📝 Commits (2) - [`4d7c367`](https://github.com/vxcontrol/pentagi/commit/4d7c3678a970f9f52ca065fbdd5aadf0ae08d58f) feat: add flow-scoped file uploads - [`263eaf5`](https://github.com/vxcontrol/pentagi/commit/263eaf56aba65e6d63d51bf23d7636dd29f13277) fix: harden flow file uploads ### 📊 Changes **6 files changed** (+842 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/pkg/server/response/errors.go` (+7 -0) 📝 `backend/pkg/server/router.go` (+13 -0) ➕ `backend/pkg/server/services/flow_files.go` (+371 -0) ➕ `backend/pkg/server/services/flow_files_test.go` (+130 -0) ➕ `frontend/src/features/flows/files/flow-files.tsx` (+312 -0) 📝 `frontend/src/features/flows/flow-tabs.tsx` (+9 -0) </details> ### 📄 Description ## Summary This PR adds a small v1 slice of flow-scoped file uploads. ## Problem Issue #193 asks for files that can be attached to a flow and then shared across the flow runtime. PentAGI already gives each flow a shared `/work` directory, but there was no UI or API path for users to place files into that workspace. ## Solution This PR adds a minimal flow files vertical: - a backend REST surface to list, upload, and download user-uploaded files for a flow - storage under the existing flow workspace at `/work/uploads` - a new `Files` tab in the flow UI with upload, refresh, filter, download, and copy-path actions - focused backend tests for filename sanitization and filesystem listing behavior This intentionally does not try to solve archive/export/delete lifecycle yet. It keeps the change small and reviewable while making uploaded files immediately available to automation, assistants, and container commands in the same flow. ## User Impact Users can now upload files directly from a flow page and reference them inside the flow runtime at `/work/uploads/<filename>`. That makes it practical to seed a flow with wordlists, configs, notes, or other local inputs without adding a broader asset platform first. ## Test Plan - `go test ./pkg/server/services -run FlowFile` - `npx eslint src/features/flows/flow-tabs.tsx src/features/flows/files/flow-files.tsx` - `npx tsc --noEmit` - `git diff --check` Refs #193 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-06 22:10:03 -04:00
yindo closed this issue 2026-06-06 22:10:03 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#287