Skip to content

Add attachments while creating tasks - #5

Merged
joewolly merged 2 commits into
mainfrom
codex/capture-attachments
Sep 20, 2026
Merged

joewolly merged 2 commits into
mainfrom
codex/capture-attachments

Conversation

@joewolly

@joewolly joewolly commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Task capture previously required saving a task and finding its detail page before attaching a file. The Add task dialog now offers Add files, multiple selection, filename/size previews, removal, and validation against the existing supported types and 1 MB limit.

The task is saved once, then selected files upload sequentially. If an upload fails, the dialog clearly says the task was saved, retains remaining files, and offers Retry uploads. Confirmed uploads are skipped on retry. Saved task fields are locked to prevent edits that would be silently ignored; users can close and finish attachments later. The detail page shares the same upload helper, including Unicode filenames and extension fallback for files with missing or unsupported browser MIME types.

Validation:

  • Node 22.23.2: 197/197 tests passed.
  • Node 24.21.0: 197/197 tests passed.
  • Local real-server Chrome/Playwright at 1440x1000, 390x844, and 320x740: title-only capture and n shortcut; file chooser/multiple selection; remove; Unicode filenames and exact downloaded bytes; notes; oversized, unsupported, and empty-file rejection before task creation.
  • Injected create/upload failures: draft/files retained, partial upload retry sends only remaining files, rapid repeat submission and Escape blocked during save, no duplicate task, close/remove after failed upload preserves saved task.
  • Meaningful content, page identity, responsive layout, and screenshots checked; no runtime errors. Console errors were limited to deliberately injected HTTP 503 responses.
  • Generic application/octet-stream files verified through both creation and the existing detail-page picker after the review fix.
  • node --check public/app.js and git diff --check passed.

No database migration or API contract change. Live iPhone picker behavior is not yet tested; rollout remains after review and merge.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7dfe7fb2-2c92-48c3-b680-8f7c80c3d849


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR appears safe to merge, with a non-blocking compatibility issue for supported files reported by browsers using a generic MIME type.

Fix All in CodexFindings

  1. P2 Generic MIME Blocks Files ▶
Fix with agent prompt
### Issue 1
public/app.js:1032-1034
If the browser reports a generic non-empty MIME such as `application/octet-stream` for a supported `.png`, `.txt`, or `.log` file, this function never checks the extension. The creation dialog then rejects the file as unsupported, while the detail-page uploader sends the same generic MIME for the server to reject. Use the known extension when the reported MIME is not allowlisted, not only when it is absent.

```suggestion
function attachmentType(file) {
  const extensionType = ATTACHMENT_TYPES[file.name.split('.').pop().toLowerCase()];
  return Object.values(ATTACHMENT_TYPES).includes(file.type)
    ? file.type
    : extensionType || 'application/octet-stream';
}
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The PR adds attachment selection and validation to the task-creation dialog, uploads selected files sequentially after task creation, and preserves pending uploads for retry without recreating the task.

  • Extracts a shared attachment-upload helper with Unicode filename handling and MIME fallback.
  • Adds multi-file previews, removal, per-file status, and post-save retry behavior.
  • Documents the task-creation attachment workflow and adds responsive presentation styles.
  • One MIME fallback edge case can reject supported extensions when the browser supplies a generic non-empty MIME.

Reviews (1) · Last reviewed commit: "Allow attachments during task capture wi..."

Comment thread public/app.js
@joewolly
joewolly merged commit 7c282da into main Sep 20, 2026
9 checks passed
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