File size: 3,205 Bytes
b2aa446
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a5981db
 
 
b2aa446
 
 
 
85f794d
b2aa446
 
85f794d
b2aa446
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"""SDLC 82 lane J Projects popup (S82-T83).

`ROWS` includes the AppView popup and Projects-page mounts through `COMBINE_ROWS`.
"""

ROWS = [
    ("S82-T83 the Projects popup is a centered dialog that traps focus through the shared overlay layer",
     "customer-grid/OverlaySurface.tsx", r"export function useOverlayLayer\(",
     "apps/amazon-profit/Projects.tsx",
     r"useOverlayLayer\(\{ panelRef, onDismiss: onClose, trapFocus: true, restoreFocus: true"),
    ("S82-T83 the centered popup portals to the body, so no Grid clip hides it",
     "customer-grid/OverlaySurface.tsx", r"export function BodyPortal\(",
     "apps/amazon-profit/Projects.tsx",
     r"<BodyPortal>\s*<div className=\"lp-cpop-scrim\" onPointerDown=\{\(event\) => \{\s*"
     r"if \(event\.target === event\.currentTarget\) event\.preventDefault\(\);\s*\}\}>"),
    ("S82-T83 a Projects list row opens that project's detail",
     "apps/amazon-profit/Projects.tsx", r"function ProjectDetail\(\{ id, canEdit: mayEdit, onChanged, onDeleted \}",
     "apps/amazon-profit/Projects.tsx",
     r"view\.kind === \"detail\"\s*\? <ProjectDetail key=\{view\.id\} id=\{view\.id\}"),
    ("S82-T83 Add SKUs inside a project searches the target door",
     "apps/amazon-profit/Projects.tsx", r"function TargetSearch\(",
     "apps/amazon-profit/Projects.tsx", r"<TargetSearch existing=\{targets\}"),
    ("S82-T83 the target search reads the Projects search door",
     "apps/amazon-profit/Projects.tsx", r"const BASE = `\$\{API_V1\}/amazon-projects`;",
     "apps/amazon-profit/Projects.tsx", r"call<\{ results: Target\[\]; total\?: number; cause\?: string \}>\(`/search\?q="),
    ("S82-T83 detail edits require both list and detail edit rights",
     "apps/amazon-profit/Projects.tsx", r"const canEdit = mayEdit && detail\.canEdit;",
     "apps/amazon-profit/Projects.tsx", r"<ProjectDetail key=\{view\.id\} id=\{view\.id\} canEdit=\{canEdit\}"),
    ("S82-T83 detail submits the project draft through PATCH",
     "apps/amazon-profit/Projects.tsx", r'const patch = useCallback\(\(change: ProjectInput(?:, fields: Array<keyof ProjectDraft>)?\) =>\s*write\(`/\$\{enc\(id\)\}`, "PATCH", change',
     # S84 lane E passes the edited Setup fields through the same PATCH write.
     "apps/amazon-profit/Projects.tsx", r'<form [^>]*className="lp-proj-detail\b[^"]*"[^>]*onSubmit=\{save\}'),
]

# The mounts are required even when a component still exports its producer.
COMBINE_ROWS = [
    ("S82-T83 Command Center declares the projects door in its seam cell renderers",
     "apps/amazon-profit/Projects.tsx", r"export function ProjectsPopup\(",
     "apps/amazon-profit/AppView.tsx",
     r"projects: \{ button: true, activate: row => setProjects\(projectsTargetFromRow\(table, row\)\)"),
    ("S82-T83 Command Center renders the Projects popup",
     "apps/amazon-profit/Projects.tsx", r"export function ProjectsPopup\(",
     "apps/amazon-profit/AppView.tsx", r"<ProjectsPopup\b"),
    ("S82-T83 the Projects tab renders the projects page, not a Grid",
     "apps/amazon-profit/Projects.tsx", r"export function ProjectsPage\(",
     "apps/amazon-profit/AppView.tsx", r"ut_amazon_projects[\s\S]*?<ProjectsPage\b"),
]

ROWS += COMBINE_ROWS