refactor(web): extract allocation drag session

This commit is contained in:
2026-04-01 11:27:03 +02:00
parent 510459fbff
commit f4e9831dea
5 changed files with 228 additions and 78 deletions
+19
View File
@@ -340,6 +340,17 @@ export const rules = [
],
forbidden: [],
},
{
file: "apps/web/src/hooks/timelineAllocationDragSession.ts",
maxLines: 70,
required: [
{
pattern: /\bexport function beginAllocationDragSession\b/,
message: "timeline allocation drag session helpers must keep document drag lifecycle centralized",
},
],
forbidden: [],
},
{
file: "apps/web/src/hooks/timelineProjectDrag.ts",
maxLines: 80,
@@ -429,6 +440,10 @@ export const rules = [
pattern: /from "\.\/timelineAllocationDragState\.js"/,
message: "timeline drag must keep allocation drag bootstrap delegated to the extracted helper module",
},
{
pattern: /from "\.\/timelineAllocationDragSession\.js"/,
message: "timeline drag must keep allocation drag document session wiring delegated to the extracted helper module",
},
{
pattern: /from "\.\/timelineProjectDrag\.js"/,
message: "timeline drag must keep project drag bootstrap and mutation gating delegated to the extracted helper module",
@@ -483,6 +498,10 @@ export const rules = [
pattern: /\bfunction createAllocationDragState\b/,
message: "timeline drag must not re-inline extracted allocation drag bootstrap helpers",
},
{
pattern: /\bfunction handle(?:Move|Up)\b/,
message: "timeline drag must not re-inline extracted allocation drag session handlers",
},
{
pattern: /\bfunction (?:createProjectDragState|buildProjectShiftMutationInput)\b/,
message: "timeline drag must not re-inline extracted project drag helper implementations",