Commit Graph

176 Commits

Author SHA1 Message Date
Mike Kell 197cc66169 feat(stage-11c): custom order tracking and fulfillment
Adds the workshop-side counterpart to Stage 11B's intake form: a tracking workspace filtered by fulfillment stage, an auditable timeline of stage changes, and inventory deduction on completion. Closes audit finding P2.2; Stage 11 is complete.

Domain: FulfillmentEvent (append-only transition record with operator notes and a malformed-line-tolerant wire format), MaterialUsage, MaterialConsumptionPort + MaterialDeductionResult. Order gains fulfillmentHistory, materialUsage, derived stage accessors, and withFulfillmentEvent(). All existing fields, defaults, and copyWith semantics preserved.

Data: advanceFulfillmentStatus() records an event with an optional note and injectable clock; recordMaterialUsage() added. WooCommerce round-trips both through _kc_ meta keys, skipping malformed lines and never blanking remote values.

Application/presentation: AdvanceFulfillment, CompleteCustomOrder, CustomOrderTrackingController, CustomOrderTrackingPage, FulfillmentTimeline, showAdvanceStageDialog. Illegal transitions surface the domain rejection reason verbatim.

Architecture: inventory deduction crosses the feature boundary through an outbound port, not a package dependency. feature_orders still has no dependency on feature_inventory; each app supplies InventoryMaterialConsumptionAdapter. Completion advances first and deducts second, so a rejected transition can never decrement stock, and a deduction failure warns rather than failing the commission.

Tests: 329 new (293 feature_orders, 22 kell_mobile, 14 kell_web). 1085/1085 feature_orders, 109/109 kell_mobile, 81/81 kell_web. dart analyze --fatal-infos clean.
2026-09-25 16:54:51 -04:00
Mike Kell 6c299e8261 Merge feat/custom-order-ui: Stage 11B custom order intake UI (2044/2044 tests passing)
Publish Docs / publish-docs (push) Successful in 53s Details
2026-09-25 15:45:29 -04:00
Mike Kell 595d0b5a93 feat(stage-11b): custom order intake UI
Adds the operator-facing intake flow for made-to-order commissions on top of
the Stage 11A domain and data layers. The form, validation, and confirmation
receipt all live in feature_orders, so web and mobile host the same widget
rather than forking business logic per platform.

Stage 11C still covers the tracking page, the status-change timeline, and
inventory deduction on completion.

Application:

- CreateCustomOrder and RecordDeposit use cases wrapping the repository
  methods added in Stage 11A, so presentation never assembles a custom order
  aggregate by hand. RecordDeposit deliberately accepts no payment identifier.
- CustomOrderFormController with field-keyed validation, so each input renders
  its own error rather than a single form-level message. Clock and ID
  generator are injected, which keeps created-at stamps and order IDs
  deterministic under test.
- All money is typed as text and converted to integer cents by
  parseMoneyToCents before it reaches DepositInfo, consistent with
  PaymentResult.amountCents. Thousands separators, currency symbols, excess
  precision, and negatives are rejected or normalised at the boundary. The
  only double is the derived OrderItem.unitPrice, computed once from cents.
- Derived balance clamps at zero rather than reporting a credit when a deposit
  exceeds the quoted total, matching DepositInfo.balanceDueCents.

Presentation:

- CustomOrderFormPage — sectioned intake (customer, specification, pricing and
  deposit, reference images) over the shared design-system widgets.
- CustomOrderConfirmationPage — order summary, spec rendering, and a deposit
  receipt showing amount, method, date, and balance only.
- FulfillmentStatusChip over the design-system KcStatusChip, covering all
  seven pipeline values.
- showReferenceImageDialog() plus ReferenceImageDialogResult with URL
  validation and de-duplication.
- OrdersPage gains an optional onCreateCustomOrder callback. When null the
  "New Custom Order" action is not rendered, so the page stays usable in hosts
  that have no intake route.

Hosts:

- kell_web: new /orders/custom route rendering CustomOrderFormPage inside
  AppShell, with ordersToCustomOrder() and customOrderToOrders() handoffs on
  AppNavigation. Confirmation returns to Orders pre-selecting the new order.
- kell_mobile: new MobileCustomOrderPage, a full-screen SafeArea host for the
  shared form, reached from an extended FAB on the orders list. Market intake
  is the primary custom-order use case, so mobile gets a dedicated route
  rather than an inline panel. The list reloads on return.

Privacy:

- The deposit receipt renders amount, method, date, and balance only. The
  transaction ID stays on PaymentResult and is asserted absent from the
  rendered confirmation by test. The controller holds no payment identifier at
  any point.

Deferred to Stage 11C, recorded in the Stage 11B section:

- Product-base selection from the catalogue; the form captures a free-text
  specification instead.
- Platform camera and file-picker capture for reference images; the dialog
  accepts validated URLs only.

Validation:

- 146 new tests: 82 on CustomOrderFormController (money parsing, setters,
  derived balance and clamping, reference image add/remove/dedupe, the full
  validation matrix, buildSpec mapping, submission, quoted vs. collected
  deposit, repository failure, duplicate ID, reset), 26 on the form page, 24
  on the confirmation page including the no-payment-identifier assertion, 3 on
  the OrdersPage entry point, 6 on MobileCustomOrderPage, and 5 on the web
  route.
- 2,044/2,044 passing across all 11 packages and apps, up from the 1,898
  baseline at 0e3987b, with no regression.
- dart analyze --fatal-infos clean across all packages and apps.
- dart format --line-length 100 clean on every file touched by this slice.

Test-harness note: the intake form is taller than the default 800x600 test
view, so the submit-button tests resize tester.view rather than working around
a layout defect. The page scrolls normally on device.

Toolchain note: kell_web/pubspec.lock picked up SDK-pinned transitive bumps on
flutter pub get (matcher 0.12.19 to 0.12.20, meta 1.18.0 to 1.19.0, test_api
0.7.11 to 0.7.12, vector_math 2.2.0 to 2.4.3). Same accepted class as the
kell_mobile bumps recorded under chore/state-reconciliation-flutter-347;
committed so the lock file matches the toolchain in use.

Closes: P2.2 (intake UI portion)
2026-09-25 15:45:04 -04:00
Mike Kell 0e3987bc1f Merge chore/state-reconciliation-flutter-347: working tree reconciliation and master document re-baseline (1898/1898 tests passing)
Publish Docs / publish-docs (push) Successful in 54s Details
2026-09-25 14:19:45 -04:00
Mike Kell ea4b76b407 chore: reconcile working tree with main and re-baseline master documents
Reconciles repository state after the local toolchain moved to Flutter 3.47.0
/ Dart 3.13.0. No product code changed - no lib/ or test/ file was modified.

Working tree drift:

1. analysis_options.yaml churn (accepted, 11 files). Flutter 3.47 ships
   AnalysisOptionsMigration, which unconditionally writes a fixed
   analyzer.exclude block into every analysis_options.yaml. It runs from
   ensureReadyForPlatformSpecificTooling, so pub get / analyze / run / build
   all restore it, and there is no opt-out (flutter#191160, flutter#191131).
   Commit 92d83e0 previously reverted this; the revert did not hold - a full
   test sweep regenerated the block in 8 more packages. Accepted and committed
   rather than fighting the tool. Verified the risky web/** entry drops
   nothing: neither kell_web/web/ nor kell_mobile/web/ contains .dart files.

2. kell_mobile web scaffold (reverted). A stray `flutter create
   --platforms=web` had added an untracked web/ directory and rewritten
   .metadata so the android platform entry was replaced by web. kell_mobile is
   the Android target, so .metadata was restored and the scaffold deleted.

3. kell_mobile/pubspec.lock (accepted). Transitive bumps resolved under the
   newer SDK: clock, matcher, meta, stack_trace, test_api, vector_math,
   vm_service. All SDK-pinned.

Master document reconciliation:

- PROJECT_STATE_AUDIT.md: removed a duplicated "## 5. Summary Scorecard"
  section - the scorecard and readiness table were present twice from a bad
  append. Re-baselined the remaining §5 against main, added a test-count
  column, and corrected §3.4 counts and §3.5 antipattern status. Stages
  10C-10F, 11A, and 16A had landed but were still recorded as missing.
- master_development_brief.md: Appendix A maturity matrix refreshed to the
  verified counts; new "Toolchain baseline" section documents the Flutter 3.47
  behaviour so a future slice does not try to revert it again.
- build_execution_tracker.md: added the reconciliation slice entry and a
  toolchain note.
- Fixed a pre-existing MD040 lint error (unlabelled code fence).

Verification:
- dart analyze --fatal-infos: clean across all 11 packages and apps
- tests: 1,898 / 1,898 passing (core 90, design_system 51, auth 42,
  integrations 123, data 63, feature_wordpress 545, feature_inventory 167,
  feature_orders 657, feature_policy 17, kell_web 62, kell_mobile 81) -
  identical to the Stage 11A total, confirming no behaviour change
- markdownlint-cli2: 0 issues
2026-09-25 14:19:36 -04:00
Mike Kell 92d83e00e2 chore: revert unrelated Flutter tool churn to analysis_options.yaml and pubspec.lock 2026-08-29 15:20:35 -04:00
Mike Kell a2354ccd36 chore: update tracker - feat/custom-order-domain merged to main (Stage 11A complete) 2026-08-29 15:20:19 -04:00
Mike Kell 85501fdaaa Merge feat/custom-order-domain: Stage 11A custom order domain and data (1898/1898 tests passing) 2026-08-29 15:19:45 -04:00
Mike Kell 86c630d670 feat(stage-11a): custom order domain and data
Adds the custom/made-to-order commission workflow to feature_orders at the
domain and data layers. No UI in this slice — Stage 11B/11C cover the
CustomOrderFormPage, confirmation, and tracking surfaces.

Custom orders extend the existing Order aggregate rather than forming a
parallel system, so they flow through the same repository contract and the
same order management pipeline as standard orders.

Domain:

- OrderType enum (standard, custom) with wireValue/fromWire; fromWire defaults
  to standard so an order written by an older client is never mis-classified
  as a commission.
- CustomOrderSpec value object — material, color, size, dimensions,
  unmodifiable reference image URLs, free-text notes, estimated completion.
  Immutable with copyWith, list-aware ==/hashCode, and a toString that reports
  the reference image count rather than the URLs.
- DepositInfo value object — all money as integer cents, consistent with
  PaymentResult.amountCents, so repeated deposit/balance/settlement arithmetic
  cannot drift. Derived balanceDueCents clamps at zero rather than reporting a
  credit when a deposit exceeds the total.
- FulfillmentStatus pipeline: quoted -> depositReceived -> inProduction ->
  qualityCheck -> readyForPickup -> completed, plus cancelled from any
  non-terminal stage. FulfillmentTransition enforces legality in the domain —
  illegal jumps, same-stage advances, and any move out of a terminal stage are
  rejected with an explanatory reason rather than silently applied.
  qualityCheck -> inProduction is permitted: failed inspection sending a piece
  back to the bench is a real workshop operation.
- Order extended with orderType (defaults to standard), nullable
  customOrderSpec, depositInfo, and fulfillmentStatus, plus isCustom,
  hasDeposit, and balanceDueCents. Every existing field, default, and copyWith
  semantic is preserved.
- OrdersRepository extended with createCustomOrder, updateCustomOrderSpec,
  recordDeposit, and advanceFulfillmentStatus.

Data:

- FakeOrdersRepository implements all four methods and seeds five custom
  orders (KC-C2001..KC-C2005) covering every non-terminal pipeline stage. The
  six standard orders are unchanged.
- WooCommerceOrdersRepository implements all four methods. Custom order state
  round-trips through 13 _kc_-prefixed order meta keys; the full mapping table
  is documented on WooCommerceOrderMapper. Spec edits and stage advances PUT
  only meta, so they can never mutate a price, a line item, or a customer
  record. balanceDueCents is derived on read, never persisted, to avoid a
  second source of truth.
- WooCommerceApiClient.updateOrder added in feature_wordpress — only
  updateOrderStatus existed, which cannot carry meta.

Observability (Stage 16A layer):

- KcLogger injected into both repositories, defaulting to KcLogger.silent().
  Domain rejections log at warning; API failures log at error with the status
  code and originating exception.
- No silent catch (_) {} blocks — every swallowed error produces both a log
  record and a failure result.
- Log context is limited to identifiers, operation names, and status names.
  Customer identity, addresses, money amounts, and payment identifiers are
  never logged, and all context additionally passes through KcRedactor.
- The deposit transaction ID is deliberately absent from both DepositInfo and
  the WooCommerce meta mapping — it lives on PaymentResult alone, because
  order meta is readable by any store administrator. Asserted by tests on both
  the object and the outgoing request body.

Also closes P3.8: adds .metadata, CHANGELOG.md, LICENSE, and README.md to
feature_orders so it matches every other package (.gitignore already existed).
The README documents the pipeline, the meta mapping, and the privacy rules.

Deviations from the brief, recorded in the Stage 11A section:

- estimatedCompletionDate lives on CustomOrderSpec rather than Order, and
  there is no separate updateEstimatedCompletion — a date revision goes
  through updateCustomOrderSpec. Deferred for review in Stage 11C.
- internalNotes not added; Order.notes already serves that purpose.

Validation:

- 423 new tests in feature_orders (234 -> 657), including an exhaustive 7x7
  legal/illegal transition matrix and coverage of every new repository method
  on both implementations.
- 1,898/1,898 passing across all packages; no regression from the 1,475
  baseline at 666abd2.
- dart analyze --fatal-infos clean across all 11 packages and apps.
- dart format --line-length 100 clean on every file touched by this slice.

Closes: P2.2 (domain + data portion), P3.8
2026-08-29 15:19:29 -04:00
Mike Kell 666abd2c26 chore: update tracker - feat/observability-error-logging merged to main (Stage 16A complete)
Publish Docs / publish-docs (push) Successful in 1m6s Details
2026-08-29 10:49:01 -04:00
Mike Kell 6389acd2ae Merge feat/observability-error-logging: Stage 16A error logging, crash capture, and bug reporting (1475/1475 tests passing) 2026-08-29 10:48:28 -04:00
Mike Kell 63a35eceeb feat(stage-16a): error logging, crash capture, and bug reporting
Closes the two findings the release committee review identified as absolute
gaps: the platform had no structured logging and no crash reporting, so runtime
errors were invisible in every environment and operators had no way to report a
defect with evidence attached.

Addresses PROJECT_STATE_AUDIT.md findings P3.4 (structured logging infrastructure)
and P3.5 (crash reporting integration), plus the "No logging infrastructure" and
"No crash reporting" architectural risks in section 3.4.

core — new observability layer (packages/core/lib/src/observability/):
- KcLogLevel: five ordered severities (debug/info/warning/error/fatal) with
  numeric severity, label, isAtLeast() threshold comparison, and fromString().
- KcLogRecord: immutable structured record (level, source, message, timestamp,
  unmodifiable context, error, stackTrace) with format(), toJson(), isFailure.
- KcRedactor: credential redaction over 14 sensitive key fragments, recursing
  through nested maps and lists. Applied to every logged context map and every
  bug report diagnostics map.
- KcLogSink contract plus three implementations: KcConsoleLogSink (silent in
  release by default), KcInMemoryLogSink (bounded ring buffer supplying bug
  report evidence), KcMultiLogSink (fan-out that tolerates a failing sink).
- KcLogger: the logging facade. Drops sub-threshold records, redacts context,
  and swallows sink exceptions so observability can never break a business
  operation. Provides forSource() for subsystem-scoped child loggers.
- KcErrorReporter: installs FlutterError.onError and
  PlatformDispatcher.instance.onError, and provides runGuarded() to wrap runApp.
  restore() resets global state so tests stay isolated.
- KcBugSeverity and KcBugReport: the report model with redacted diagnostics,
  hasFailureEvidence, toJson() for transmission, and toMarkdown() for export.
- KcBugReportSink contract plus KcInMemoryBugReportSink.
- KcBugReportService: validates input, attaches the recent log tail as evidence,
  logs the submission outcome, and returns a failure result rather than throwing
  when the tracker is unreachable.
- KcObservability: assembles logger, evidence buffer, and bug report service
  together. Building them independently is the most likely way to produce empty
  bug reports, so this bundle guarantees they share one buffer.

design_system:
- KcBugReportDialog and KcBugReportDraft: the shared operator reporting form
  with inline validation, severity selection, optional reporter identity, and an
  explicit statement that logs are attached and credentials are never included.
  Kept free of a core dependency so design_system stays dependency-free.

Application wiring (kell_web and kell_mobile):
- AppServices and MobileAppServices hold a KcObservability; all four factories
  (fake/wordpress/square/multi) stamp their environment label so reports are
  attributable to the mode that produced them.
- Both main.dart entry points install the global error handlers before the first
  frame and wrap runApp in a guarded zone, then emit a startup record capturing
  the effective environment and whether a fake-mode credential fallback occurred.
- "Report a problem" action added to the AppShell and MobileShell app bars,
  capturing the active screen (and tab index on mobile).

Documentation:
- docs/operations/release-checklist.md (new): per-environment release gates for
  Development, Test/QA, Staging, and Production. Each environment inherits the
  prior one's gates and adds its own, with build commands, functional and
  observability verification, a sign-off record, rollback triggers, and the open
  blocker register.
- master_development_brief.md: Stage 16A manifest, corrected baseline, Stage 16C
  defined for the deferred scope (retry/rate limiting, remote sink, health
  dashboard, analytics). Marked the square()/multi() factory and ID conflation
  debt items resolved (fixed in Stage 10E but still listed as open).
- build_execution_tracker.md: Stage 16A slice entry.
- PRD.md: milestone table brought current; observability added to infrastructure
  requirements. Added a scoped markdownlint-disable for MD011 because the PRD's
  "(text)[cite: n]" citation markers are indistinguishable from reversed links
  and were silently corrupted by markdownlint --fix during this review.
- mkdocs.yml and operations/index.md: register the release checklist.

Corrections made during review:
- The documented test total of 1,458 omitted feature_policy's 17 tests. The true
  grand total is 1,475; both figures are now documented with the reason.

Validation:
- 85 new tests: 56 core, 10 design_system, 10 kell_web, 9 kell_mobile.
- 1,475/1,475 passing across all 11 packages and apps.
- dart analyze --fatal-infos clean across all 11 packages and apps.
- markdownlint clean on all five modified/created documents.

Known limitations (tracked as Stage 16C):
- Logs and bug reports are held in-process only. There is no remote sink, so
  diagnostics are lost on restart and are unavailable off-device.
- Usage analytics and the per-channel integration health dashboard are not
  implemented; IntegrationHealthCheck remains a contract with no implementation.
2026-08-29 10:48:18 -04:00
Mike Kell 7bf8f55a3e Merge feat/square-mobile-pos: Stage 10C Square Mobile POS / Checkout (1373/1373 tests passing)
Publish Docs / publish-docs (push) Successful in 1m1s Details
2026-07-25 17:37:45 -04:00
Mike Kell 47b13b1ed1 feat(stage-10c): Square Mobile POS / Checkout
- Add PaymentMethod enum (cash, card) with label/iconHint extensions
- Add PaymentResult value object (transactionId, amountCents, method, completedAt, receiptUrl, amountFormatted)
- Add PaymentService abstract contract + PaymentException
- Add CheckoutController (ChangeNotifier) with CartEntry and sealed CheckoutState hierarchy
- Add FakePaymentService (always succeeds, counter-based IDs)
- Update feature_orders barrel exports
- Add MobileCheckoutPage (product selection -> cart -> payment -> receipt flow)
- Add Sales tab (index 4) to MobileShell; 6 tabs total
- Wire paymentService + checkoutCatalogue into all MobileAppServices factories
- Add 36 new feature_orders tests (234 total)
- Add 18 new kell_mobile tests (72 total); 1373 total across all packages
- Update widget_test.dart: destination count 5 -> 6
- Update build_execution_tracker.md and master_development_brief.md

All tests passing. dart analyze clean.
2026-07-25 17:37:36 -04:00
Mike Kell 94c62931fd chore: update tracker — feat/square-sync-ui merged to main (Stage 10F complete)
Publish Docs / publish-docs (push) Successful in 40s Details
2026-07-25 16:59:05 -04:00
Mike Kell 93af845021 merge(feat/square-sync-ui): SquareSyncStatusPanel + IntegrationsPage + MobileIntegrationsPage + squareSyncController wired into both shells 2026-07-25 16:58:26 -04:00
Mike Kell 116255f8ac feat(stage-10F): SquareSyncStatusPanel + IntegrationsPage + MobileIntegrationsPage + squareSyncController wired into both shells 2026-07-25 16:55:46 -04:00
Mike Kell a74cf35bd1 merge(feat/square-catalog-sync-service-controller): SquareSyncController + square()/multi() factories + KcBootstrap Square validation + ID conflation fix
Publish Docs / publish-docs (push) Successful in 49s Details
2026-07-25 16:29:25 -04:00
Mike Kell cf1e78d27d Dleted Commit.txt
Validate Docs / validate-docs (push) Successful in 34s Details
Flutter Analyze / Dart Analyze (push) Has been cancelled Details
Flutter Test / Flutter Tests (push) Has been cancelled Details
2026-07-25 16:27:59 -04:00
Mike Kell ab56c942c7 feat(stage-10E): SquareSyncController + square()/multi() factories + KcBootstrap Square validation + ID conflation fix
Stage 10E - feat/square-catalog-sync-service-controller

P1.1 AppServices.square() / multi() factories (kell_web + kell_mobile)
P1.2 SquareCatalogSyncService ID conflation fix (squareCatalogObjectId lookup)
P1.4 SquareSyncController ChangeNotifier (SyncPhase, syncAll, reset, disposal guard)
P1.5 KcBootstrap Square credential validation with fallback warning

New files:
  feature_wordpress/lib/src/application/square_sync_controller.dart
  feature_wordpress/test/square_sync_controller_test.dart (18 tests)

Modified files:
  feature_wordpress/lib/src/domain/product_draft.dart (squareCatalogObjectId field)
  feature_wordpress/lib/src/application/square_catalog_sync_service.dart (ID conflation fix)
  feature_wordpress/lib/feature_wordpress.dart (barrel export)
  kell_web/lib/composition/app_services.dart (square/multi factories)
  kell_mobile/lib/composition/mobile_app_services.dart (square/multi factories)
  kell_web/test/composition/app_services_test.dart (+23 tests)
  kell_mobile/test/composition/mobile_app_services_test.dart (+23 tests)
  docs/development/build_execution_tracker.md

Test results: 537/537 feature_wordpress, 47/47 kell_web, 49/49 kell_mobile,
              34/34 core, 167/167 feature_inventory - 834 total, 0 failures
dart analyze --fatal-infos: no issues found across all 5 packages
2026-07-25 16:26:53 -04:00
Mike Kell b4d2c44d10 Merge chore/audit-state-sync: incorporate PROJECT_STATE_AUDIT.md findings into tracking docs
Publish Docs / publish-docs (push) Successful in 46s Details
2026-07-25 15:56:52 -04:00
Mike Kell 4280a77017 chore: audit-state-sync — incorporate PROJECT_STATE_AUDIT.md findings into tracking docs 2026-07-25 15:56:44 -04:00
Mike Kell 70607d36f4 Merge feat/square-catalog-sync-service into main (Stage 10D)
Publish Docs / publish-docs (push) Successful in 48s Details
2026-07-25 15:17:40 -04:00
Mike Kell eb8e2250d6 feat(stage-10d): SquareCatalogSyncService + SquareSyncResult + SyncError + InventorySyncAdapter 2026-07-25 15:17:22 -04:00
Mike Kell f4949d8c9b Cline Rules for consistent builds
Publish Docs / publish-docs (push) Successful in 44s Details
2026-07-25 15:06:18 -04:00
Mike Kell 7e3cded043 Merge feat/square-catalog-sync-repositories into main (Stage 10C) 2026-07-25 15:04:35 -04:00
Mike Kell 7ccc119a62 feat(stage-10c): SquareCatalogRepository + SquareInventoryRepository 2026-07-25 15:04:26 -04:00
Mike Kell 079bf8c0f0 Updated Agentic Instructions
Publish Docs / publish-docs (push) Successful in 54s Details
2026-07-25 11:03:51 -04:00
Mike Kell 7020433e5a feat: Stage 10B — Square catalog/inventory mappers + ProductIdMapping domain (feat/square-catalog-sync) 2026-07-25 11:02:50 -04:00
Mike Kell 2a0bf6fa90 docs: finalize Stage 10B docs — tracker merged status, brief updated with validation state and next branch 2026-07-25 11:02:34 -04:00
Mike Kell bb54dfcf59 docs: update build_execution_tracker for Stage 10B (feat/square-catalog-sync) 2026-07-25 08:00:29 -04:00
Mike Kell a6f888c672 feat(stage-10b): Square catalog and inventory sync mappers + ProductIdMapping 2026-07-25 07:59:13 -04:00
Mike Kell 4b1168dbfa chore: update tracker — feat/square-api-client merged to main
Publish Docs / publish-docs (push) Successful in 40s Details
2026-07-19 19:48:44 -04:00
Mike Kell 3ea1d66477 Merge feat/square-api-client into main (Stage 10A complete) 2026-07-19 19:48:13 -04:00
Mike Kell 9b2dd15ee2 feat(integrations): Stage 10A — Square API client and authentication
Validate Docs / validate-docs (push) Successful in 1m14s Details
Flutter Analyze / Dart Analyze (push) Has been cancelled Details
Flutter Test / Flutter Tests (push) Has been cancelled Details
2026-07-19 19:26:00 -04:00
Mike Kell a95bc5f18a chore(mobile): update .metadata to Flutter 3.44.4 stable
Publish Docs / publish-docs (push) Successful in 1m8s Details
2026-07-11 16:49:57 -04:00
Mike Kell 51ae862394 fix(mobile): resolve 8 Android debug errors and Kotlin migration
- Migrate to Flutter built-in Kotlin: set builtInKotlin=true and
  newDsl=true in gradle.properties; remove id(kotlin-android) from
  app/build.gradle.kts. Eliminates the Kotlin Gradle Plugin WARNING
  that caused 8 stderr lines in the VS Code Debug console.

- Fix DashboardController lifecycle in MobileShell: move controller
  creation from _buildBody() (called on every rebuild) to
  didChangeDependencies() so it is initialised once and reused.
  Prevents repeated data loads on every tab switch and resolves the
  203 skipped frames Choreographer warning.

- Fix KcSummaryCard RenderFlex overflow (8 cards, 19px each): reduce
  icon size 28->22px, switch spacing to xs, wrap value Text in
  FittedBox(scaleDown) with fontSize 28, use bodySmall + maxLines for
  label. Cards now fit within the GridView childAspectRatio:1.6
  constraint on all phone screen sizes.

All tests pass: 27 kell_mobile + 41 design_system.
2026-07-11 16:48:31 -04:00
Mike Kell 1023249592 Merge feat/wc-catalog-expansion-ui into main (Stage 9D complete)
Publish Docs / publish-docs (push) Successful in 1m1s Details
2026-07-11 10:50:41 -04:00
Mike Kell a127ddba3a feat(stage-9d): product creation UI, category management page, mobile create-product page 2026-07-11 10:50:32 -04:00
Mike Kell 204bd3b118 chore: remove stray commit_msg.txt
Publish Docs / publish-docs (push) Successful in 1m20s Details
2026-07-11 10:23:57 -04:00
Mike Kell 24e387e412 Merge feat/wc-catalog-expansion into main (Stage 9C complete) 2026-07-11 10:23:42 -04:00
Mike Kell 0a45ecb1c0 feat(wc-catalog-expansion): Stage 9C — WooCommerce catalog expansion
- Add ProductCategory domain model (id, name, slug, parentId, count) with copyWith, equality, toString
- Add ProductImage domain model (id, url, alt, position) with copyWith, equality
- Extend ProductPublishingRepository contract: createProduct, deleteProduct, updateProductImages, getProductImages, getCategories, createCategory, updateCategory, deleteCategory
- Implement all 8 new methods in FakeProductPublishingRepository with seed categories
- Implement all 8 new methods in WordPressProductPublishingRepository
- Add WooCommerceApiClient methods: createProduct, deleteProduct, getCategories (paginated), createCategory, updateCategory, deleteCategory, getProductImages, setProductImages
- Add use cases: CreateProduct, DeleteProduct, GetCategories, CreateCategory, UpdateProductImages
- Update feature_wordpress.dart barrel exports
- Update test stubs in dashboard_controller_test.dart and product_publishing_page_test.dart
- Add 69 new tests in wc_catalog_expansion_test.dart (388 total feature_wordpress, 24 kell_web — all passing)
- Update master_development_brief.md and build_execution_tracker.md
2026-07-11 10:23:31 -04:00
Mike Kell 9564329283 Merge feat/wc-inventory-sync into main (Stage 9B complete)
Publish Docs / publish-docs (push) Successful in 48s Details
2026-07-11 10:01:07 -04:00
Mike Kell 5df3d8beac feat(inventory): Stage 9B — WooCommerce stock/inventory sync 2026-07-11 10:00:55 -04:00
Mike Kell bb51db7d35 Merge feat/wc-orders-integration into main (Stage 9A complete)
Publish Docs / publish-docs (push) Successful in 40s Details
2026-07-11 09:45:47 -04:00
Mike Kell e92788038a feat(orders): Stage 9A - WooCommerce Orders API integration
- Extend OrderStatus with onHold, refunded, failed
- Extend OrderItem with productId, variationId, customizations
- Extend Order with paymentMethod, source, customFields
- Add OrderSource enum (online, market, manual)
- Add getOrder(id) to OrdersRepository contract and FakeOrdersRepository
- Add WooCommerceOrderMapper (WooCommerce JSON <-> Order domain)
- Add WooCommerceOrdersRepository implementing full OrdersRepository
- Add orders API methods to WooCommerceApiClient (getOrders, getOrder,
  updateOrderStatus, createOrder, addOrderNote)
- Export WooCommerceApiClient/WooCommerceApiException from feature_wordpress
- Add feature_wordpress + http dev deps to feature_orders pubspec
- 83 new tests: mapper (25), repository+API client (23), FakeRepo.getOrder (3),
  plus existing suite grows to 198/198 feature_orders
- All packages analyze clean; 847/847 total tests passing
- Update master_development_brief.md and build_execution_tracker.md
2026-07-11 09:45:36 -04:00
Mike Kell 003347c89c merge: feat/auth-foundation into main (Stage 8C complete)
Publish Docs / publish-docs (push) Successful in 52s Details
2026-07-11 08:48:28 -04:00
Mike Kell bda93640e4 feat(auth): Stage 8C - authentication foundation
- Add KcUser/KcUserRole domain models with copyWith, equality, toString
- Add AuthState sealed hierarchy (unauthenticated, loading, authenticated, error)
- Add AuthService abstract contract (signIn, signOut, refreshSession, stream)
- Add AuthException with optional HTTP statusCode
- Add CredentialStore abstract contract with CredentialKeys constants
- Add InMemoryCredentialStore implementation
- Add FakeAuthService with role-based sign-in simulation
- Add KcAppEnvironment.square to core enum with SQ label
- Add KcBootstrap square case (falls back to fake until Stage 10A)
- Update kell_web and kell_mobile shell environment badges for square case
- Add integrations dependency to kell_web and kell_mobile pubspec.yaml
- Add auth to run_all_tests.sh TESTABLE and ANALYZABLE lists
- Add 42 auth tests (42/42 passing)
- Add 1 new core test for square bootstrap fallback (21/21 passing)
- Update master_development_brief.md: Stage 8C complete, Stage 8 complete
- Total: 764/764 tests passing, dart analyze clean

Stage 8 (infrastructure package activation) is now complete.
Next: feat/wc-orders-integration (Stage 9A)
2026-07-11 08:48:18 -04:00
Mike Kell 0ef6ecceb0 Merge feat/data-layer-contracts into main (Stage 8B complete)
Publish Docs / publish-docs (push) Successful in 36s Details
2026-07-11 08:32:04 -04:00
Mike Kell 4a935e4989 feat(data): Stage 8B — shared data layer contracts activated 2026-07-11 08:31:46 -04:00