# feat\(mobile\): allow several new-task drafts per project · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/22c1f6750db3ef8ddc708977aa0e9d7d549591b8)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 22c1f6750db3ef8ddc708977aa0e9d7d549591b8

Requested commit: 22c1f6750db3ef8ddc708977aa0e9d7d549591b8

Commit: 22c1f6750db3ef8ddc708977aa0e9d7d549591b8

Tree: ff4fdea8c1cb3d1d6ab28791f0ebfb43f575b88e

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
feat(mobile): allow several new-task drafts per project

New-task drafts were keyed `new-task:<environmentId>:<projectId>`, one slot
per project, so starting a new task in a project always landed in whatever
draft already sat there and there was no way to hold two ideas for the same
repo. Web mints a draft id per draft and never had this limit; with drafts
now listed in the mobile thread list the single slot became visible.

Drafts are keyed `new-task:<draftId>` and carry their project in a
`project` stamp (environment, project, createdAt). Legacy project-keyed
entries are rewritten on load, so nothing on users' devices is lost. Each
New Task entry mints a fresh draft; tapping a Draft row resumes that draft
by id via a new `draftId` route param. Switching projects mid-compose
retargets the same draft (text and mode choices follow, branch/worktree
are cleared) instead of copy-if-empty across keys. A rejected pending task
restores into its own message-keyed draft rather than merging into
whatever the user is typing. Drafts list newest first by their own
createdAt instead of a render-time stamp.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

```

## Parents

- [0286e753379f59474ff9bf68b4459a3c15c2798a](https://git.cafe/pingdotgg/t3code/commit/0286e753379f59474ff9bf68b4459a3c15c2798a?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/22c1f6750db3ef8ddc708977aa0e9d7d549591b8?format=markdown)
