Skip to content

[DO NOT MERGE] Stage 1 integration check - #5

Closed
kris7011 wants to merge 10 commits into
mainfrom
integration/stage-1-check
Closed

kris7011 wants to merge 10 commits into
mainfrom
integration/stage-1-check

Conversation

@kris7011

Copy link
Copy Markdown
Owner

Temporary draft PR to run CI on all stage 1 PRs merged together in the recommended order (merge commits). It will be closed and the branch deleted once CI has finished. Do not merge.

kris7011 and others added 10 commits October 16, 2026 13:36
CI only built and tested the .NET solution; the React frontend was
never validated, and npm run lint failed with two
react-hooks/set-state-in-effect errors.

- Add a frontend job (npm ci, lint, build) next to the .NET job and
  run CI on pull requests to any base branch
- Load initial dashboard and weekly schedule data in effects that only
  set state in promise callbacks
- Refresh after generating or resetting a schedule without replacing
  the dashboard with the full-page loading state
- Reload employee preference profiles after a demo reset; previously
  they stayed empty or stale until a browser reload

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Replace nine hard-coded API_BASE_URL constants with api/config.ts,
  configurable through VITE_API_BASE_URL (default unchanged)
- translateRiskMessage removed the first '.' in 'Schedule coverage is
  78.57%.', showing '7857%' whenever the API runs with an English or
  invariant culture (e.g. in the Docker image). Only strip the
  sentence-ending period.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests use fixtures captured from the real API after a demo reset and
cover the overview, error/retry, refresh behaviour after generation,
preference reload after reset and the weekly schedule table. CI now
runs npm test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- EF Core 9.0.7 -> 9.0.21: SQLitePCLRaw.lib.e_sqlite3 2.1.10 -> 2.1.13
  (GHSA-2m69-gcr7-jv3q, high)
- Swashbuckle.AspNetCore 10.1.7 -> 10.2.3: Microsoft.OpenApi 2.4.1 ->
  2.7.5 (GHSA-v5pm-xwqc-g5wc, high)
- Microsoft.AspNetCore.OpenApi 9.0.15 -> 9.0.21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Read the SQLite connection string from ConnectionStrings:ShiftPlanner
  (default unchanged) so tests can use an isolated database
- Expose Program to WebApplicationFactory
- POST /api/load-analysis returned 500 when an employee lacked the
  skill for an assigned shift; return 400 with an error message
- Use { error } bodies for scheduling validation errors, matching the
  employee and shift endpoints
- Add 20 WebApplicationFactory tests on in-memory SQLite covering
  demo data, generation, simulation, analysis and validation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The model staffs each shift with exactly one employee: ShiftEntity has
a single EmployeeId and no RequiredStaff column, schedule generation
assigns one employee per open shift, coverage counts shifts with an
employee, and simulation suggests one employee. POST /api/shifts still
accepted any RequiredStaff and silently persisted 1, and the simulation
UI let users request more staff than could ever be assigned.

- Add Shift.SupportedRequiredStaff (1) and IsSupportedRequiredStaff as
  the single source of truth; use it in ShiftRepository
- Return 400 for RequiredStaff != 1 on POST /api/shifts,
  /api/schedule/simulate and /api/load-analysis; omitted values
  default to 1
- Replace the simulation staffing input with a fixed note
- Document the staffing model and add unit and integration tests
- Run CI for pull requests to any base branch (same trigger,
  permissions and concurrency block as the CI PR)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kris7011

Copy link
Copy Markdown
Owner Author

Integration check passed (all stage 1 PRs merged together, CI green). Closing as planned.

@kris7011 kris7011 closed this Oct 16, 2026
@kris7011
kris7011 deleted the integration/stage-1-check branch October 16, 2026 12:44
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.

1 participant