Skip to content

Attach new artifacts through a running task's artifact modal - #376

Open
tildesrc wants to merge 1 commit into
mainfrom
panopticon/attach-artifacts-to-running-task
Open

Attach new artifacts through a running task's artifact modal#376
tildesrc wants to merge 1 commit into
mainfrom
panopticon/attach-artifacts-to-running-task

Conversation

@tildesrc

Copy link
Copy Markdown
Contributor

What

Adds the ability to attach new artifacts to a running task, reached from that task's artifact modal (the a key on the dashboard).

  • In the artifact list modal (ArtifactScreen), ctrl+a now opens the file-picker and uploads the queued files to the task.
  • The artifact modal now opens even when the task has no artifacts yet, so attach is always reachable (previously a on an empty task just warned and opened nothing).

DRY with task creation

The picker is ArtifactsScreen — the same modal the task-creation memo uses for its ctrl+a attach — reused wholesale, along with _artifact_path_candidates (shell-quoted-path parsing), validate_segment, and the raw-bytes read. The only new code is the wiring plus a small per-file upload helper (Dashboard._attach_artifacts) that targets an existing task's REST artifacts via put_artifact, rather than the create-task seed. Follows the existing "modal returns an intent, Dashboard does the I/O" pattern (mirrors the modal's rest/local modes) — the viewer dismisses with a new attach mode and the Dashboard opens the picker and uploads.

Binary files (screenshots) attach byte-for-byte via the raw-bytes put_artifact; no server, REST, or MCP changes were needed.

🤖 Generated with Claude Code

Add a `ctrl+a` binding to the running-task artifact modal that opens the
same file-picker used by the task-creation attach flow, then uploads each
queued file to the task via `put_artifact`. The modal now opens even when
the task has no artifacts yet, so attach is always reachable.

DRY: reuses `ArtifactsScreen` (the picker) and `_artifact_path_candidates`
wholesale — the only new code is the wiring and the per-file upload, which
targets an existing task's REST artifacts rather than the create-task seed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant