OUT-4029 | Scope task/label deletion by id + workspace (fix cross-workspace collateral deletes) - #1399
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThe PR removes generated task labels and scopes recursive and assignee deletion operations to task IDs and the authenticated workspace.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Delete task in workspace] --> B[Select live descendant IDs by ltree path and workspace]
B --> C[Soft-delete matching IDs with workspace scope]
C --> D[Preserve tasks in other workspaces]
E[Create new task] --> F[Database supplies empty label default]
F --> G[Public serializer retains label field]
Reviews (3): Last reviewed commit: "OUT-4029 | Stop generating task labels; ..." | Re-trigger Greptile |
priosshrsth
reviewed
Aug 13, 2026
priosshrsth
left a comment
Collaborator
There was a problem hiding this comment.
@SandipBajracharya Let's not create label too.
Contributor
|
Deployment failed for project tasks-app with the following error: Learn More: https://vercel.link/multiple-function-regions |
Collaborator
Author
|
@greptileai review again |
SandipBajracharya
force-pushed
the
OUT-4029
branch
from
August 26, 2026 05:10
67e46d8 to
86cd394
Compare
SandipBajracharya
force-pushed
the
OUT-4029
branch
from
August 26, 2026 08:45
86cd394 to
22d5700
Compare
… Labels rows softDeleteAllSubtasks and deleteAllAssigneeTasks deleted rows keyed on the task label string with no workspaceId filter. Labels has no workspaceId and prefixes derive from brand/company names, so strings like THE10-001 collide across workspaces and deletes wiped other workspaces' tasks. - softDeleteAllSubtasks: select id (not label) and deleteMany by id + workspaceId - deleteAllAssigneeTasks: drop the unscoped label.deleteMany - Remove LabelMappingService.deleteLabel and its call sites; Labels is a next-number registry where orphan rows are harmless and deleting them rolls the counter back, causing duplicate label reissue Co-Authored-By: Claude Opus 4.8 <[email protected]>
- Unit: softDeleteAllSubtasks and deleteAllAssigneeTasks delete by id/assignee scoped to workspaceId and never touch Labels rows - Integration: two workspaces sharing a label string; deleting one workspace's tree soft-deletes only its own subtree and leaves the other untouched - seedTask: optional label so integration tests can seed colliding labels Co-Authored-By: Claude Opus 4.8 <[email protected]>
authenticate.test.ts failed to load: p-retry and is-network-error are pure ESM and next/jest only transforms packages listed in transpilePackages. - next.config.js: transpile p-retry / is-network-error (also adds ngrok dev origin) - authenticate.test.ts: update the public-route source fallback assertion from "public" to "platform" to match the intentional change in commit eb76729 (was hidden while the suite couldn't load) Co-Authored-By: Claude Opus 4.8 <[email protected]>
…tibility Stops generating per-task label codes and deletes LabelMappingService and the Labels registry table. Keeps the Tasks.label column (now @default('')) so the public automation API stays backward compatible: pre-existing tasks keep their codes, new tasks return ''. - Public API: label retained in PublicTaskDtoSchema + serializer, with a serializer test locking the contract (empty for new, preserved for old). - Internal app no longer uses label — drag preview shows the workflow-state icon, the breadcrumb shows the task title, the search filter drops the label matcher. - Breadcrumb: desktop truncates the title at 25 chars; below 600px it uses a shorter 12-char title to avoid the platform header overflowing. - Migration (edited in place): set Tasks.label DEFAULT '' and DROP TABLE Labels (the column is kept, not dropped). Co-Authored-By: Claude Opus 4.8 <[email protected]>
SandipBajracharya
force-pushed
the
OUT-4029
branch
from
August 26, 2026 08:49
22d5700 to
38c0843
Compare
Collaborator
Author
|
@greptileai review for the last time |
priosshrsth
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
SubtaskService.softDeleteAllSubtasks(anddeleteAllAssigneeTasks) deleted DB rows keyed on the tasklabelstring with noworkspaceIdfilter.Labelshas noworkspaceIdcolumn and prefixes derive from brand/company names, so strings likeTHE10-001collide across workspaces — deleting a task in one workspace soft-deleted tasks (and Labels rows) in other workspaces.Prod impact (read-only queries, 2026-08-06): 2,390 tasks soft-deleted as collateral across 263 workspaces; worst offender
THE10-001spanned 121 workspaces.Linear: OUT-4029
Changes
Core fix
softDeleteAllSubtasks: selectid(notlabel) from the ltree query anddeleteManybyid+workspaceId.deleteAllAssigneeTasks: drop the unscopedlabel.deleteMany.LabelMappingService.deleteLabeland all call sites.Labelsis a next-number registry — orphan rows are harmless, and deleting them rolls the counter back and causes duplicate label reissue. This also makes the OUT-4027 null-guard (OUT-4027 | Fix 500 when deleting a task whose label row is missing #1397) moot.Tests
workspaceIdand never touchLabels.THE10-001; deleting one workspace's tree soft-deletes only its own subtree and leaves the other untouched. Verified to fail against the old string-keyed code and pass with the fix.Test infra (incidental)
next.config.js:transpilePackages: ['p-retry', 'is-network-error']sonext/jestcan load these pure-ESM deps (fixes a pre-existingauthenticate.test.tsload failure). Also carries a ngrok dev-origin line.authenticate.test.ts: corrected a stale public-routesourceassertion (public→platform) that matched an intentional earlier change (eb76729f), previously hidden while the suite couldn't load.Not included / follow-ups
src/cmd/script + product sign-off (per the ticket's open question).Labelstable now accumulates orphan rows on delete/reassign (agreed tradeoff) — worth a follow-up if the table grows large.Verification
yarn tscclean,yarn lint:checkclean.🤖 Generated with Claude Code