Initial commit: JDE Scoping Tool migration project

Set up repository with legacy .NET Framework 4.8 source (OLD/),
new .NET 10 Blazor solution (NEW/), OpenSpec specifications,
documentation, and project configuration.
This commit is contained in:
Joseph Doherty
2026-01-02 07:43:29 -05:00
commit 26ff8d9b4f
1761 changed files with 596509 additions and 0 deletions
@@ -0,0 +1,166 @@
# Additional OpenSpec Specifications Design
## Overview
This document describes three new OpenSpec specifications to capture legacy SQL business logic and web UI, extending the existing 7 specs in the legacy-spec-capture-plan.
## New Specifications
### Session 8: sql-business-logic
**Purpose:** Capture business logic in stored procedures and functions.
**Source Files:**
- `OLD/Database/StoredProcedures/SubmitSearch.sql`
- `OLD/Database/StoredProcedures/StartSearch.sql`
- `OLD/Database/StoredProcedures/CompleteSearch.sql`
- `OLD/Database/StoredProcedures/ResetPartialSearches.sql`
- `OLD/Database/Functions/MatchMis.sql`
**Requirements to Document:**
| Procedure/Function | Purpose | Key Business Logic |
|--------------------|---------|-------------------|
| `SubmitSearch` | Create new search record | Inserts Search with Status=Queued, returns new ID via OUTPUT |
| `StartSearch` | Mark search as processing | Updates Status to Processing, sets StartDT |
| `CompleteSearch` | Finalize search with results | Updates Status to Complete/Failed, stores Excel binary, sets EndDT |
| `ResetPartialSearches` | Recovery on service restart | Resets stuck "Processing" searches back to "Queued" |
| `MatchMis` | Table-valued function for MIS matching | Complex matching logic against MIS data based on item/operation/routing |
**Dependencies:** database-schema, domain-models
---
### Session 9: sql-views-types
**Purpose:** Capture SQL views and table-valued parameter types.
**Source Files:**
- `OLD/Database/Views/*.sql` (7 files)
- `OLD/Database/Types/*.sql` (7 files)
**Views to Document:**
| View | Purpose | Underlying Tables |
|------|---------|-------------------|
| `LastDataUpdates` | Latest successful sync per table/type | DataUpdate (aggregated) |
| `WorkOrderTotalScrap` | Aggregated scrap quantities | WorkOrderStep_Curr/Hist |
| `WorkOrder` | Union of _Curr and _Hist | WorkOrder_Curr, WorkOrder_Hist |
| `WorkOrderTime` | Union of _Curr and _Hist | WorkOrderTime_Curr, WorkOrderTime_Hist |
| `WorkOrderStep` | Union of _Curr and _Hist | WorkOrderStep_Curr, WorkOrderStep_Hist |
| `WorkOrderComponent` | Union of _Curr and _Hist | WorkOrderComponent_Curr, WorkOrderComponent_Hist |
| `LotUsage` | Union of _Curr and _Hist | LotUsage_Curr, LotUsage_Hist |
**Table-Valued Parameter Types to Document:**
| Type | Columns | Used By |
|------|---------|---------|
| `WorkOrderFilterParameter` | WorkOrderNumber (bigint) | Search query building |
| `ItemNumberFilterParameter` | ItemNumber (nvarchar) | Search query building |
| `ProfitCenterFilterParameter` | Code (nvarchar) | Search query building |
| `WorkCenterFilterParameter` | Code (nvarchar) | Search query building |
| `OperatorFilterParameter` | UserName (nvarchar) | Search query building |
| `ComponentLotFilterParameter` | LotNumber, ItemNumber | Search query building |
| `ItemOperationMISFilterParameter` | ItemNumber, Operation, MisNumber, MisRevision | MIS extraction |
**Dependencies:** database-schema, domain-models
---
### Session 10: web-ui
**Purpose:** Capture web UI pages, components, interactions, and map to Blazor/Radzen.
**Source Files:**
- `OLD/WebInterface/Views/**/*.cshtml`
- `OLD/WebInterface/Scripts/*.js`
**Pages to Document:**
| Page | Legacy View | Purpose |
|------|-------------|---------|
| Login | `Account/Login.cshtml` | LDAP authentication form |
| NotAuthorized | `Account/NotAuthorized.cshtml` | Access denied message |
| Search List | `Search/Index.cshtml` | User's searches with grid, status, download |
| Search Create/Edit | `Search/Create.cshtml` | Multi-filter search form with 8 filter types |
| Search Queue | `Search/Queue.cshtml` | Admin view of all queued searches |
| Refresh Status | `RefreshStatus/Index.cshtml` | Data sync status dashboard |
| Layout | `Shared/_Layout.cshtml` | Navigation, header, SignalR connection |
**For Each Page, Document:**
1. Layout/Structure - Header, sections, footer
2. Components - Each UI control with legacy (Kendo) → new (Radzen) mapping
3. Data Binding - What data is displayed, how it's loaded
4. Interactions - Button clicks, form submissions, real-time updates
5. Validation - Client-side and server-side rules
6. Radzen Implementation - Component markup with properties and event handlers
**Component Mapping Format:**
| UI Element | Legacy (Kendo) | Radzen Component | Key Properties |
|------------|----------------|------------------|----------------|
| Data grid | `kendoGrid` | `RadzenDataGrid<T>` | `AllowPaging`, `AllowSorting` |
| Multi-select | `kendoMultiSelect` | `RadzenDropDown` | `Multiple="true"` |
| Date picker | `kendoDatePicker` | `RadzenDatePicker` | `DateFormat` |
| Button | Kendo button | `RadzenButton` | `Icon`, `ButtonStyle` |
**Radzen Implementation Example:**
```razor
<RadzenDataGrid @ref="grid" Data="@searches" TItem="SearchViewModel"
AllowPaging="true" PageSize="10" AllowSorting="true"
IsLoading="@isLoading">
<Columns>
<RadzenDataGridColumn TItem="SearchViewModel" Property="Name" Title="Search Name" />
<RadzenDataGridColumn TItem="SearchViewModel" Property="Status" Title="Status">
<Template Context="search">
<RadzenBadge BadgeStyle="@GetStatusStyle(search.Status)" Text="@search.Status.ToString()" />
</Template>
</RadzenDataGridColumn>
</Columns>
</RadzenDataGrid>
```
**Dependencies:** All previous specs (full system context needed)
---
## Session Workflow
Each session follows the established workflow:
1. **SCOPE** - List files to analyze
2. **ANALYZE** - Read legacy files, extract behaviors/rules
3. **DRAFT** - Write spec.md following OpenSpec format
4. **REVIEW** - Two-step validation:
- Format: `openspec validate --specs`
- Content: Codex MCP cross-reference against legacy source
5. **COMMIT** - Save to `openspec/specs/<area>/spec.md`
6. **HANDOFF** - Summary and open questions
## Codex MCP Review Prompts
**For sql-business-logic:**
> "Review sql-business-logic/spec.md against OLD/Database/StoredProcedures/*.sql and OLD/Database/Functions/*.sql. Verify all parameters, return values, error conditions, and business rules are accurately captured."
**For sql-views-types:**
> "Review sql-views-types/spec.md against OLD/Database/Views/*.sql and OLD/Database/Types/*.sql. Verify column definitions, join logic, and TVP schemas are accurate."
**For web-ui:**
> "Review web-ui/spec.md against OLD/WebInterface/Views/**/*.cshtml. Verify all UI elements, interactions, and data bindings are captured. Check that Radzen component mappings are appropriate."
## OpenSpec Format Requirements
All specs MUST follow OpenSpec format:
- `## Purpose` section (not Overview)
- `### Requirement:` with SHALL/MUST language
- `#### Scenario:` with WHEN/THEN format
- Validate with `openspec validate --specs` before commit
## Updates Required
Update `PLANS/legacy-spec-capture-plan.md`:
- Add Sessions 8, 9, 10 to execution order table
- Add session checklists for each new spec
- Update spec organization diagram
+107
View File
@@ -0,0 +1,107 @@
# Top Navbar Layout Design
**Date:** 2026-01-02
**Goal:** Adjust the NEW Client project UI to match the legacy app's top navbar layout instead of sidebar navigation.
---
## Summary
Replace the current Radzen sidebar navigation with a fixed-top Bootstrap-style navbar containing horizontal navigation links. This matches the legacy JDE Scoping Tool's look and feel as documented in `webui_lf.md`.
---
## Layout Structure
```
+------------------------------------------------------------------+
| [Navbar - Fixed Top, Dark Theme] |
| +--------------------------------------------------------------+ |
| | JDE Scoping Tool | Searches | New Search | Queue | Status | [User] [Logout] |
| +--------------------------------------------------------------+ |
+------------------------------------------------------------------+
| |
| [Main Content - Full Width Container] |
| +--------------------------------------------------------------+ |
| | | |
| | @Body | |
| | | |
| +--------------------------------------------------------------+ |
| |
| -------------------------------------------------------------- |
| [Footer: JDE Scoping Tool - Manufacturing Data Analysis] |
+------------------------------------------------------------------+
```
---
## Color Scheme
| Element | Color | CSS Value |
|---------|-------|-----------|
| Navbar background | Dark gray | `#222` |
| Brand text | White | `#fff` |
| Nav links (normal) | Light gray | `#9d9d9d` |
| Nav links (hover/active) | White | `#fff` |
| Username text | Light gray | `#9d9d9d` |
| Login button | Primary blue | `#337ab7` |
| Logout button | Light variant | - |
| Navbar height | ~56px | - |
---
## Content Area Changes
| Aspect | Current (Sidebar) | New (Top Nav) |
|--------|-------------------|---------------|
| Width | ~calc(100% - 220px) | Full width (100%) |
| Top padding | 0 | 56px (navbar height) |
| Side padding | 1rem | 15px (Bootstrap container) |
---
## Files to Modify
### 1. `MainLayout.razor`
- Remove `RadzenSidebar` and `RadzenPanelMenu`
- Add horizontal nav links using Blazor `NavLink` components
- Simplify body structure (remove horizontal stack wrapping sidebar)
- Add CSS class for fixed-top navbar behavior
### 2. `app.css`
- Change header background from `#1b6ec2` to `#222`
- Add fixed-top navbar positioning
- Add body padding-top: 56px for navbar clearance
- Add nav link styling (normal, hover, active states)
- Remove sidebar-related styles (`.rz-sidebar`, `.rz-panel-menu`)
---
## Navigation Links
Using Blazor's `NavLink` for automatic active state detection:
| Link Text | Route | Match |
|-----------|-------|-------|
| Searches | `/` | `NavLinkMatch.All` |
| New Search | `/search` | Default |
| Search Queue | `/search/queue` | Default |
| Refresh Status | `/refresh-status` | Default |
---
## Components
**Keep:**
- `RadzenLayout`, `RadzenHeader`, `RadzenBody`, `RadzenFooter`
- Dialog, Notification, ContextMenu, Tooltip services
**Remove:**
- `RadzenSidebar`
- `RadzenPanelMenu`, `RadzenPanelMenuItem`
---
## Mobile Considerations
Keep horizontal layout for now (legacy app wasn't mobile-first). The navbar will handle basic responsive behavior through Radzen's built-in styling.