Skip to content

Merge main to production - #1440

Merged
SandipBajracharya merged 4 commits into
productionfrom
main
Aug 26, 2026
Merged

Merge main to production#1440
SandipBajracharya merged 4 commits into
productionfrom
main

Conversation

@SandipBajracharya

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview Aug 26, 2026 1:12pm

Request Review

SandipBajracharya and others added 4 commits August 26, 2026 18:56
… 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]>
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project tasks-app with the following error:

Deploying Serverless Functions to multiple regions is restricted to the Pro and Enterprise plans.

Learn More: https://vercel.link/multiple-function-regions

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes task-label generation and the Labels persistence model while retaining the public API’s legacy label field. It also makes recursive task deletion workspace-safe, hardens assignee-cache failures, and updates task filtering, breadcrumbs, drag previews, configuration, and tests.

  • Adds an empty-string default for new task labels and drops the obsolete label-mapping table and service.
  • Changes descendant deletion from label matching to exact task IDs scoped to the authenticated workspace.
  • Preserves stored labels in public task serialization for backward compatibility.
  • Falls back to network-backed assignee data when browser storage is unavailable.
  • Replaces label-based search and presentation with title and workflow-state information.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code failure identified.

The label model, task lifecycle services, private consumers, migration, and public compatibility serializer are updated coherently, while recursive deletion is narrowed to exact descendant IDs within the acting workspace and storage failures retain a network-backed fallback.

Important Files Changed

Filename Overview
prisma/migrations/20260825000000_drop_task_label_and_labels_table/migration.sql Sets the durable task-label default to an empty string and removes the obsolete label-mapping table.
prisma/schema/task.prisma Aligns the Prisma task model with label generation removal while retaining the field for compatibility.
src/app/api/tasks/tasks.service.ts Removes label generation and cleanup from private task lifecycle operations while preserving assignment, hierarchy, and event behavior.
src/app/api/tasks/public/public.service.ts Removes label generation from public task writes while continuing to return the persisted compatibility field.
src/app/api/tasks/subtasks.service.ts Replaces collision-prone label-based subtree deletion with workspace-scoped deletion by exact descendant IDs.
src/app/_cache/forageStorage.ts Treats unavailable browser storage as a cache miss and leaves the network fetch path responsible for assignee data.
src/hooks/useFilter.tsx Removes label matching from keyword search in alignment with the retired generated-label feature.
src/types/dto/tasks.dto.ts Removes labels from the private task response and ancestor contracts while leaving public serialization compatibility intact.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Create task] --> B[Persist task]
    B --> C[label defaults to empty string]
    C --> D[Private task consumers use title and workflow state]
    C --> E[Public serializer retains label field]
    F[Delete parent task] --> G[Select live descendant IDs by ltree path and workspace]
    G --> H[Soft-delete matching task IDs]
    H --> I[Prevent cross-workspace deletion]
Loading

Reviews (1): Last reviewed commit: 1bc04dd | Re-trigger Greptile

@SandipBajracharya
SandipBajracharya merged commit 1962941 into production Aug 26, 2026
2 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.

2 participants