Skip to content

fix(connections): widen CoreCapability with Invoicing, fix capability panel copy - #1320

Merged
piotrswierzy merged 7 commits into
mainfrom
1287-fix-invoicing-capability-panel-copy
Jul 3, 2026
Merged

fix(connections): widen CoreCapability with Invoicing, fix capability panel copy#1320
piotrswierzy merged 7 commits into
mainfrom
1287-fix-invoicing-capability-panel-copy

Conversation

@jakubretajczykBD

@jakubretajczykBD jakubretajczykBD commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add 'Invoicing' to the frontend's CORE_CAPABILITY_VALUES union, which was missing it even though the backend has accepted this capability since ADR-026 (KSeF, Subiekt, Infakt all declare supportedCapabilities: ['Invoicing']).
  • This gap caused ConnectionCapabilitiesPanel to render a false "adapter is not recognized" notice for any Invoicing-only connection (e.g. KSeF) — the panel filters supportedCapabilities through the FE's isCoreCapability guard, so 'Invoicing' was silently dropped and the list looked empty.
  • Fix the panel copy itself: replaced the mojibake apostrophe (\u2019 escape leaking into JSX) and the inaccurate "adapter is not recognized" message with an accurate "no capabilities available to toggle here."
  • Simplify the PrestaShop/WooCommerce setup schemas to validate enabledCapabilities against the shared CORE_CAPABILITY_VALUES constant instead of hand-duplicated z.enum([...]) literals — this duplication was the root cause of the list drifting out of sync in the first place.
  • Update two stale comments in the KSeF setup form/schema that cited the now-fixed CORE_CAPABILITY_VALUES gap as the reason for omitting enabledCapabilities from the create payload.

Related issues

Closes #1287

Test plan

  • pnpm --filter @openlinker/web type-check passes
  • Updated ConnectionCapabilitiesPanel.test.tsx: renamed the fallback-copy test, added a new case asserting an Invoicing-only connection renders a checked checkbox (not the fallback notice)
  • Verified backend consistency independently: CoreCapabilityValues (libs/core), CreateConnectionDto/UpdateConnectionDto (@IsIn whitelist), and the ConnectionService per-adapter supportedCapabilities guard — confirmed PrestaShop/WooCommerce cannot have Invoicing enabled even though the schema's enum is now broader (UI only renders checkboxes for the adapter's actual supportedCapabilities, and the backend independently rejects out-of-scope capabilities)

Quality gate

  • pnpm lint passes (zero errors)
  • pnpm type-check passes (zero errors)
  • pnpm test passes (all unit tests green)
  • Optional, Docker required: pnpm test:integration passes — needed
    only if you touched apps/api/test/integration/** or any plugin's
    infrastructure/adapters/.

By submitting this pull request, I confirm that my contributions
are made under the terms of the Apache License 2.0, and I
certify the Developer Certificate of Origin
by signing off my commits.

jakubretajczykBD and others added 2 commits July 2, 2026 14:10
… panel copy

The frontend's CoreCapabilityValues union was missing 'Invoicing' even
though the backend has accepted it since ADR-026. This caused the
capabilities panel to show a false "adapter is not recognized" notice
for Invoicing-only connections (e.g. KSeF) with zero recognized
capabilities. Also cleans up the mojibake apostrophe in that message
and drops the now-redundant hardcoded capability enums in the
PrestaShop/WooCommerce setup schemas in favor of CORE_CAPABILITY_VALUES.

Closes #1287

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: jakubret <jakub.retajczyk@blockydevs.com>
@jakubretajczykBD
jakubretajczykBD marked this pull request as ready for review July 2, 2026 12:17

@piotrswierzy piotrswierzy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — Approve with changes

Nice, focused fix. I verified the four risk areas and they all hold:

  • Backend independently rejects out-of-scope capabilitiesConnectionService.create (L192–198) and update (L366–371) both throw BadRequestException when enabledCapabilities ⊄ metadata.supportedCapabilities. Widening the PS/WC zod schemas to z.enum(CORE_CAPABILITY_VALUES) cannot let PrestaShop/WooCommerce gain Invoicing.
  • UI only renders the adapter's own capabilities — the panel filters connection.supportedCapabilities and the create form filters adapterMetadata.supportedCapabilities; neither PS nor WC ships Invoicing, so no Invoicing checkbox is ever offered or submitted.
  • Copy fix is real — the old string rendered a literal -escape; the replacement is accurate.
  • Test — asserts the Invoicing checkbox is checked, 1 of 1 enabled, and the fallback notice is gone. Good coverage, correct accessible-name query, no any.

IMPORTANT — parity is still incomplete

The description says "the FE union now matches the backend CoreCapabilityValues" and frames the shared-constant dedup as fixing "the root cause of the list drifting out of sync." That's only partly true. Backend CoreCapabilityValues has 8 members; this PR brings the FE to 6:

  • backend (libs/core/.../adapter.types.ts:22-35): ProductMaster, InventoryMaster, OrderProcessorManager, OrderSource, OfferManager, ProductPublisher, CategoryProvisioner, Invoicing
  • FE after this PR (connections.types.ts): ProductMaster, InventoryMaster, OrderProcessorManager, OrderSource, OfferManager, Invoicing

ProductPublisher and CategoryProvisioner are shipped today by both real adapters:

  • libs/integrations/prestashop/src/prestashop-plugin.ts:72-73
  • libs/integrations/woocommerce/src/woocommerce-plugin.ts:52-53

So on every PrestaShop/WooCommerce connection, isCoreCapability (ConnectionCapabilitiesPanel.tsx:48-49) silently drops those two — the "N of M enabled" counter undercounts and neither is togglable. That's the same bug class #1287 fixes, still open for two capabilities, and the FE constant is still a hand-maintained mirror rather than a genuine single source of truth.

Two ways forward:

  1. Add both members here (needs matching CAPABILITY_HELP entries in the two Record<CoreCapability, string> maps, same as the Invoicing entry you already added), or
  2. Explicitly scope this PR to Invoicing, file a follow-up for the other two, and soften the "now matches the backend" wording.

SUGGESTION

ConnectionCapabilitiesPanel.tsx:43-47 — the comment justifies the narrow with "the backend's request DTO is still strict on CoreCapabilityValues," but that allow-list is the full 8-member set, so ProductPublisher/CategoryProvisioner are valid to send. The rationale doesn't actually explain excluding them; worth tightening alongside the item above.

The Invoicing fix itself is correct and safe to ship — this is about not overstating the parity claim and closing the same gap for the two capabilities PS/WC already advertise.

The frontend's CoreCapabilityValues was still missing the two shop-listing
capabilities (ADR-024) even after the earlier Invoicing fix, so connections
that support ProductPublisher/CategoryProvisioner had those capabilities
silently filtered out of the toggle panel. Mirrors the backend's
CoreCapabilityValues exactly and adds help copy + a regression test.

Signed-off-by: jakubret <jakub.retajczyk@blockydevs.com>
@jakubretajczykBD

Copy link
Copy Markdown
Collaborator Author

SELF TECH-REVIEW

Summary

Small, well-scoped frontend change that widens the FE's CORE_CAPABILITY_VALUES to mirror the backend's full CoreCapabilityValues (adding ProductPublisher/CategoryProvisioner from ADR-024, alongside the already-present Invoicing from ADR-026), and updates the two Record<CoreCapability, string> help-text maps + adds a regression test accordingly. I verified pnpm lint (ESLint), tsc --noEmit, and the affected vitest suite (8/8) all pass, and confirmed the new entries match backend order/naming (ShopProductManagerPort, ADR-024) exactly. No architecture, boundary, or state-ownership issues — this is a pure constant/type/copy fix consistent with the FE-002 "narrow to core caps until the DTO validator lands" pattern already established in this file.

Issues

[SUGGESTION] — apps/web/src/features/connections/components/ConnectionCapabilitiesPanel.tsx, prestashop-setup-form.tsx

▎ npx prettier --check flags both files, but this predates the diff (confirmed via git stash) — the new lines just add two more long single-line object entries in the same already-non-conformant style as their siblings. Not a regression and not gated by pnpm lint (which runs ESLint, not Prettier), so not blocking. Worth a follow-up pnpm format pass sometime, unrelated to this PR's scope.

[SUGGESTION] — apps/web/src/features/connections/components/ConnectionCapabilitiesPanel.test.tsx:120

▎ Test name ('renders togglable checkboxes for ProductPublisher and CategoryProvisioner (shop-listing caps)') doesn't follow the should [behavior] when [condition] convention from docs/testing-guide.md § Best Practices. Every other test in this file has the same drift, though, so this is pre-existing file style, not a new violation worth blocking on.

[SUGGESTION] — apps/web/src/features/connections/api/connections.types.ts

▎ Good catch keeping the two new entries in the exact same order as backend CoreCapabilityValues (libs/core/src/integrations/domain/types/adapter.types.ts) with a comment that correctly names ShopProductManagerPort and ADR-024 — this is the kind of drift-prevention worth calling out as done right, not just an absence of problems.

No BLOCKING or IMPORTANT issues found. I also checked for silent gaps this kind of change typically introduces:

  • Other Record<CoreCapability, …> maps that could go stale — grepped the whole FE, only these two exist, both updated.
  • Hardcoded capability enums elsewhere (*-setup.schema.ts for PrestaShop/WooCommerce/InPost/DPD) — all derive from CORE_CAPABILITY_VALUES rather than duplicating it, so they inherit the widened set for free; their separate *_FALLBACK_CAPABILITIES allowlists are intentionally explicit and correctly untouched.
  • WooCommerce form has no capability-help UI (seeds silently), so no third map was missed.

Verdict

✅ Approve — ready to merge.

@norbert-kulus-blockydevs

Copy link
Copy Markdown
Collaborator

Tech review

Solid, well-scoped FE fix. The capability widening is verified safe end-to-end: backend CoreCapabilityValues already carries all 8 values, ConnectionService.create/update independently reject capabilities outside the adapter manifest (connection.service.ts:194-201, :366-375), both exhaustive Record<CoreCapability, string> maps were updated, the new tests genuinely exercise the regression (an Invoicing-only connection fails the old supported.length === 0 branch), and CI is green (lint / type-check / unit / integration). No architecture, boundary, or security violations.

Findings

[IMPORTANT] Plan + analysis docs contradict the shipped scope
docs/plans/implementation-plan-connection-capabilities-panel-invoicing.md (§2 Out of Scope, §5) and docs/plans/analysis/ANALYSIS-connection-capabilities-panel-invoicing.md - both committed in this PR - explicitly declare widening CORE_CAPABILITY_VALUES with 'ProductPublisher' / 'CategoryProvisioner' out of scope ("defer to a separate follow-up issue"), yet the code in the same diff adds both values, both CAPABILITY_HELP entries, and a dedicated test. The plan's factual premise ("No in-tree adapter currently declares either capability") is also false at head: libs/integrations/prestashop/src/prestashop-plugin.ts:67-74 declares both (ADR-024). The analysis doc additionally claims no Infakt FE setup form exists, while infakt-setup.schema.ts does. The PR description likewise mentions only 'Invoicing'. The code itself is correct - please amend the docs with a short scope-amendment note (ADR-024 caps pulled in because PrestaShop already declares them) and add the addition to the PR summary, so the durable planning record matches what shipped.

[SUGGESTION] Toggle round-trip drops non-core enabled capabilities
ConnectionCapabilitiesPanel.tsx handleToggle (~line 66): enabled is filtered through isCoreCapability, so saving a toggle on e.g. an Allegro connection silently drops ShippingProviderManager from enabledCapabilities, disabling shipping-label generation. Pre-existing and genuinely blocked on the #576 runtime-aware DTO validator, but the rewritten comment frames it only as "not editable from this UI yet" - worth an explicit hazard note or a tracked issue.

[SUGGESTION] Duplicated CAPABILITY_HELP maps
ConnectionCapabilitiesPanel.tsx:22-31 and prestashop-setup-form.tsx:44-54 now each carry three more near-identical entries (and the PS form gains dead Invoicing copy purely to satisfy Record exhaustiveness). This is the same drift shape this PR fixed for the Zod enums. Consider one shared feature-local help map with per-form overrides. Related nit: the panel comment hardcodes "8-member", which will go stale on the next capability addition - phrasing without the count avoids that.

[SUGGESTION] PS vs WC wizard defaults now visibly disagree
With the widen, the PrestaShop wizard's Step 2 renders ProductPublisher / CategoryProvisioner checkboxes but defaults them unchecked (static PRESTASHOP_FALLBACK_CAPABILITIES, prestashop-setup.schema.ts:21-26), while the WooCommerce form reseeds defaults from the adapter manifest (woocommerce-setup-form.tsx:51-59). No regression, but if unchecked-by-default is intentional for the ADR-024 caps, a one-line comment on the fallback list would preempt "why isn't ProductPublisher enabled" reports; otherwise consider adopting the WC reseed pattern.

Verified non-issues: switching PS/WC schemas to z.enum(CORE_CAPABILITY_VALUES) is more permissive than the old 5-member enums, but the loosening is unreachable through the UI (forms seed exclusively from the manifest filtered through CORE_CAPABILITY_VALUES) and the backend manifest guard rejects out-of-manifest values, so behavior is unchanged; trigger-sync-dialog.types.ts uses the type non-exhaustively; the dpd/inpost schema omission comments remain accurate; the KSeF comment updates are accurate; the mojibake is fully removed.

Verdict

Approve with changes - the code is correct and well-tested; fix the IMPORTANT plan/analysis/PR-description scope contradiction before merge.

@piotrswierzy piotrswierzy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: #1320 — widen FE CoreCapability with Invoicing + panel copy fix

Summary

Correct, well-scoped fix for #1287. Verified the widened FE CORE_CAPABILITY_VALUES now mirrors the backend's CoreCapabilityValues (libs/core/src/integrations/domain/types/adapter.types.ts) exactly — all 8 members including the previously-missing ProductPublisher / CategoryProvisioner (ADR-024) and Invoicing (ADR-026), in the same order and with matching provenance comments. Replacing the hand-duplicated z.enum([...]) literals in the PrestaShop/WooCommerce setup schemas with the shared constant removes the exact duplication that caused this drift, and the two stale KSeF comments citing the old gap are correctly updated.

Positive observations

  • The new tests cover both the regression (Invoicing-only connection renders a checked checkbox, not the fallback notice) and the shop-listing capabilities, plus the renamed fallback-copy case — good Arrange-Act-Assert shape and names.
  • The mojibake escape leaking into JSX text is gone along with the inaccurate "adapter is not recognized" copy — the new "no capabilities available to toggle here" is honest about what the panel actually knows.
  • Widening the PS/Woo zod enums to the full set is safe: the UI only renders checkboxes for the adapter's actual supportedCapabilities, and the backend independently rejects out-of-scope capabilities (verified per the test plan).
  • CAPABILITY_HELP: Record<CoreCapability, string> extensions in both consumers — the exhaustive Record type would have failed the build otherwise, nice safety property.

🟢 Optional (non-blocking)

  1. FE↔BE mirror drift remains structural. The FE can't import libs/core, so CORE_CAPABILITY_VALUES stays a hand-mirror of CoreCapabilityValues — this PR fixes today's drift but nothing prevents the next one. A tiny check:invariants script comparing the two arrays would close the class of bug permanently. Worth a follow-up issue.
  2. CAPABILITY_HELP is duplicated between ConnectionCapabilitiesPanel.tsx and prestashop-setup-form.tsx (pre-existing; this PR extends both copies). Hoisting to a single shared map in the feature would keep the copy from drifting the same way the enums did.

Verdict

Approve — ready to merge as-is; the two suggestions are follow-up material.

norbert-kulus-blockydevs added a commit that referenced this pull request Jul 3, 2026
…tup guide

Live-E2E-verified against the inFakt sandbox (2026-07-03):
- section 1: Default payment method wizard field + Transfer bank-account
  behaviour (live picker on the Edit form, eager persist, inFakt default
  sync) with fresh wizard + edit-form screenshots
- section 3: Download the invoice PDF step (rendered PDF via
  RegulatoryDocumentReader, #1321)
- corrections: issuance-time line snapshot note (#1297)
- README: BankAccountsReader / BankAccountDefaultSetter /
  RegulatoryDocumentReader notes + implementation details
- capability-panel screenshot (post-#1320)

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
norbert-kulus-blockydevs added a commit that referenced this pull request Jul 3, 2026
…emantics

Live-E2E-verified on the KSeF test environment (2026-07-03):
- new tutorial Part 2a - per-connection payment config (method, term,
  bank account, SWIFT, skonto) with fresh screenshots
- setup-guide: config.payment field reference + issuance-time line
  snapshot semantics in the Corrections section (#1297)
- README: Platnosc feature bullet
- re-captured 12-ol-ksef-detail.png with the post-#1320 capability panel

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

@piotrswierzy piotrswierzy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/pr-review — systematic review

Verdict: 🔄 Approve with changes — the code is correct, safe, and well-tested; the required fixes before merge are documentation amendments only (no code changes).

Verified against the live tree

  • Backend CoreCapabilityValues (libs/core/src/integrations/domain/types/adapter.types.ts) carries all 8 values incl. 'Invoicing' — the FE 5-member drift and the resulting false "adapter is not recognized" fallback are real; the mojibake escape is real on main.
  • The safety chain for the widened zod enums holds end-to-end: setup-form checkboxes/seeds gate on adapterMetadata?.supportedCapabilities ∩ CORE_CAPABILITY_VALUES, and the backend independently rejects out-of-manifest values (@IsIn(CoreCapabilityValues) + the ConnectionService manifest guard). A PS connection cannot end up with Invoicing enabled.
  • Only two exhaustive Record<CoreCapability, string> consumers exist in apps/web — both updated here; nothing else consumed the old narrow enums. CI green at head.

🟡 IMPORTANT — amend the record before merge (no code change)

The shipped code contradicts the planning docs it ships alongside, and the deviation is behavior-visible. Both committed docs (docs/plans/implementation-plan-connection-capabilities-panel-invoicing.md §2/§5 and the analysis doc) explicitly defer 'ProductPublisher'/'CategoryProvisioner' to a follow-up, resting on the premise that no in-tree adapter declares them — false at head: both the PrestaShop (prestashop-plugin.ts:67-74) and WooCommerce manifests declare both. The diff widens with all three values anyway, and the PR body mentions only 'Invoicing'. Concretely: (a) the PS wizard now renders two new unchecked checkboxes; (b) every new WooCommerce connection created via the FE now silently seeds ProductPublisher + CategoryProvisioner as enabled (the manifest reseed passes through the now-wider filter — pre-PR it stripped them). I verified this is low-risk (all ProductPublisher consumers are user-initiated publish flows; no scheduler enumerates by it, and it aligns FE-created connections with backend defaulting) — but it's an unannounced behavior change. The analysis doc also has two factual errors ("No Infakt FE setup form exists" — apps/web/src/plugins/infakt/ ships one; ksef-setup-form.tsx cited at features/connections/components/ — actual: plugins/ksef/components/).

Please: amend the PR body + add a short scope-amendment note to both docs (why the ADR-024 caps came along; the WC seed-enable effect) and fix the two factual errors.

🟢 SUGGESTIONS (optional fast-follows)

  • ConnectionCapabilitiesPanel.tsx:48-49 — pre-existing lossy-save hazard the rewritten comment glosses over: enabled is filtered through isCoreCapability and the mutation sends a full replacement set, so toggling any core capability on an Allegro connection silently drops its non-core 'ShippingProviderManager'. Blocked on the #576 DTO follow-up, but add one sentence naming the drop hazard (or file a tracking issue).
  • ConnectionCapabilitiesPanel.tsx:47 — the comment hardcodes "the full 8-member set"; the count will go stale on the next capability addition (the exact drift shape this PR fixes). Drop the number.
  • Two hand-duplicated CAPABILITY_HELP maps now each carry three more near-identical entries (and PS gains dead Invoicing copy for Record exhaustiveness) — consider one shared help map.
  • PS vs WC now visibly disagree on ADR-024 defaults (PS unchecked, WC silently enabled) — a one-line comment on PRESTASHOP_FALLBACK_CAPABILITIES would preempt "why isn't ProductPublisher enabled" reports.

✅ Positive observations

  • Root-cause fix is right-sized: z.enum(CORE_CAPABILITY_VALUES) eliminates the exact drift mechanism that caused the bug.
  • Tests assert behavior, not implementation — the new Invoicing case genuinely fails on pre-fix code.
  • No literal platformType dispatch introduced; capability gating stays manifest-driven; mojibake fully removed with a rephrase that avoids the possessive.

(This independently re-verified the earlier review's claims — PS manifest lines, Infakt FE existence, ShippingProviderManager drop hazard — and they all hold.)

jakubretajczykBD and others added 2 commits July 3, 2026 16:30
…suggestion fixes

PR review (#1320) found the plan/analysis docs contradicted the shipped
scope (ProductPublisher/CategoryProvisioner widen) and contained factual
errors (Infakt FE form, KSeF file path). Adds a scope-amendment note
covering the WooCommerce silent capability-seed behavior change, corrects
the remaining stale KSeF path reference, drops the hardcoded "8-member"
comment, and documents the ShippingProviderManager drop hazard and the
PS/WC capability-default disagreement.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: jakubret <jakub.retajczyk@blockydevs.com>
@piotrswierzy

Copy link
Copy Markdown
Collaborator

Verified 1696b70e against the review: the scope-amendment note (including the WooCommerce silent-seed behavior change and the PS/WC default disagreement) landed in the plan, both analysis-doc factual errors are corrected, the "8-member" comment is de-numbered, the lossy-save hazard is now documented at the exact filter site, and the PRESTASHOP_FALLBACK_CAPABILITIES comment preempts the "why unchecked" question. All review items addressed — approval stands. ✅

@piotrswierzy

Copy link
Copy Markdown
Collaborator

Re-reviewed at 1696b70e — approval stands. ✅

Verified the merge of main was clean (no main-side deletions; #1297 migration, issuedLineSnapshot, and the #1330 schema seam all intact on the branch — checked explicitly given an unrelated PR tripped on exactly that today), and all 7 CI checks are green at the new head.

Two cosmetic items left for merge time:

  1. PR body — it still describes only the Invoicing widen. Since squash-merge derives the main commit message from the title/body, please add one paragraph covering the ProductPublisher/CategoryProvisioner widening + the WooCommerce seed-enable behavior change (the committed plan's scope-amendment note has the exact wording to borrow).
  2. Branch is behind main again (fix(shared): export ./worker subpath so worker + api health boot #1331 landed since your merge) — conflict-free update, fix(shared): export ./worker subpath so worker + api health boot #1331 touches nothing this PR touches.

@piotrswierzy
piotrswierzy merged commit e629837 into main Jul 3, 2026
7 checks passed
piotrswierzy added a commit that referenced this pull request Jul 3, 2026
… tag recipe (#1339)

Pre-merge fixes for the 0.1.0 release-please baseline, from the PR #1332
review:

- release-please-config.json: bump bootstrap-sha to the current main tip
  (e629837) so the first post-merge run stays dormant instead of opening
  a 0.2.0 Release PR that double-credits work the curated 0.1.0 section
  already describes (#1309/#1317/#1329/#1320/#1331).
- CHANGELOG.md + RELEASING.md § Versioning policy: reword the pre-1.0
  bump semantics to match the shipped config (minor = features +
  breaking, patch = fixes; bump-patch-for-minor-pre-major is false, so
  feat: bumps minor). RELEASING.md now cites the config keys so the two
  can't silently drift apart again. PUBLIC_API.md's "patch = additive"
  convention is intentionally untouched — that is the separate npm
  package axis (Changesets, deferred), not the product line.
- RELEASING.md v0.1.0 recipe: tag the bootstrap-sha commit explicitly
  instead of the main tip at tag time — once a v0.1.0 tag + Release
  exist, release-please parses from that tag's commit, so tagging later
  silently drops commits from the generated 0.2.0 changelog.
- release-please.yml: pin googleapis/release-please-action by commit SHA
  (v4.4.1) — the workflow holds contents+pull-requests write.

Also merges origin/main (e629837) to bring the branch current.

Refs #1332
Closes #1339

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Piotr Swierzy <piotr.swierzy@blockydevs.com>
norbert-kulus-blockydevs added a commit that referenced this pull request Jul 6, 2026
… reality check

- ADR-030: fix ksef_data.status mapping (success -> accepted, not cleared) -
  the ADR was re-canonizing exactly the bug the shipped adapter comment
  warns against
- bank-picker docs (BankAccountsReader/BankAccountDefaultSetter, #1310)
  now describe a MERGED feature - #1310 landed to main 2026-07-03,
  after Piotr's review; no doc changes needed, kept as-is post branch update
- setup-guide step 5: replace the nonexistent "Rotate webhook secret" FE
  button with the actual API call (curl snippet against
  POST /v1/connections/:id/webhooks/secret/rotate); invert the
  secret-exchange framing to lead with what if4's screenshot actually
  shows (no secret field) and mark the paste-into-inFakt direction
  explicitly unverified
- README: add defaultPaymentMethod + bankAccount to the Config JSON
  example (InfaktConnectionConfig carries both since #1309/#1310)
- plan: retarget addendum noting the branch now targets main with all
  prereqs merged
- merged origin/main (branch was behind #1297/#1329/#1310/#1320/#1331)

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
piotrswierzy pushed a commit that referenced this pull request Jul 6, 2026
… Subiekt nexo (#1284)

* docs(integrations): add README + operator tutorials for all 8 adapter packages

Add per-package README.md to every integration package that was missing one:
ai, allegro, dpd-polska, erli, inpost, ksef, subiekt, woocommerce.
Each README covers adapter key + capabilities, credentials/config shape,
and links to further operator docs.

Add full A-to-Z operator tutorials for KSeF and Subiekt nexo with per-step
screenshot placeholders (ksef/tutorial.md, subiekt/tutorial.md). The Subiekt
tutorial covers bridge setup via PowerShell/WSL (without-exe-packaging branch),
wizard, B2B faktura, B2C paragon, and idempotency. The KSeF tutorial covers
token generation on the MF portal, connection wizard, B2B order, issuance, and
UPO download.

Create libs/integrations/ksef/assets/ and libs/integrations/subiekt/assets/
directories for future screenshot captures.

Update root README Integrations table to link the tutorial.md files for KSeF
and Subiekt nexo.

Closes #1265
Closes #1266

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NQB4zBWSrneR71TRKkx1t
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): add real Playwright screenshots + rewrite KSeF and Subiekt tutorials

Replaces all placeholder screenshot references in KSeF and Subiekt nexo
tutorials with actual Playwright captures taken against a live OpenLinker
instance (preview build with all in-flight FE PRs merged).

KSeF assets (14 PNGs):
  01-02: connections list + platform picker
  03-09: wizard fields (name, env, NIP, address, auth-type, secret)
  10-12: connection created, list, detail page
  13-14: invoices list with regulatory badges, invoice detail

Subiekt assets (18 PNGs):
  06-15: connection wizard (empty -> filled -> created -> test -> list -> detail)
  20-26: invoice flow (orders list, order detail, connection picker,
          ready-to-issue, issue clicked, issued state, invoices list)

Tutorial rewrites:
  - ksef/tutorial.md: reordered around actual wizard fields; Part 1 (KSeF portal)
    marked manual; Parts 2-5 use real screenshot refs
  - subiekt/tutorial.md: full rewrite to match connection-picker flow (multiple
    Invoicing connections), real bridge startup instructions, TLS note, idempotency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): add real Subiekt nexo FS document screenshot to tutorial

Part 5 (verify in Subiekt nexo) was the only remaining manual-step
placeholder without a real capture. Replaces it with an actual screenshot
of an issued FS document open in Subiekt nexo desktop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(ksef): add real KSeF 2.0 test-portal screenshots for token generation

Part 1 (get a KSeF authorisation token) was the last manual-step
placeholder. Captures the full flow on the live ap-test.ksef.mf.gov.pl
portal: test-auth login, NIP + test certificate, dashboard, token list,
generate-token form, and the revealed token (value redacted before commit
since it's a live, usable test-environment credential).

Also corrects the test-portal URL: ksef-test.mf.gov.pl (KSeF 1.0) was
decommissioned 2025-09-01; the current test environment is
ap-test.ksef.mf.gov.pl (KSeF 2.0).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): point to the openlinker-subiekt-bridge repo

The bridge is being moved to its own repo under the openlinker-project
org (not yet published). Update README + tutorial repo links and clone
paths accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): move all integration docs + assets under libs/integrations/<pkg>/docs/

Establishes one consistent convention across all 8 integration packages:
docs (setup guides, runbooks, tutorials) and their image assets live at
libs/integrations/<pkg>/docs/ and libs/integrations/<pkg>/docs/assets/,
co-located with the code they document instead of split across a separate
docs/integrations/<pkg>/ tree.

Moves (via git mv, history preserved):
- docs/integrations/<pkg>/*.md -> libs/integrations/<pkg>/docs/*.md
  (allegro, dpd-polska, erli, inpost, ksef, prestashop, subiekt, woocommerce)
- docs/integrations/woocommerce/screenshots/ -> .../woocommerce/docs/assets/
- docs/assets/erli/ -> libs/integrations/erli/docs/assets/
- docs/assets/subiekt/ -> libs/integrations/subiekt/docs/assets/
  (merged with the tutorial screenshots already at .../subiekt/assets/,
  no filename collisions)
- libs/integrations/{ksef,subiekt}/tutorial.md -> .../docs/tutorial.md
- libs/integrations/{ksef,subiekt}/assets/ -> .../docs/assets/

Rewrites every relative link and image reference in the moved files
(directory depth changed by one level), updates the 8 package READMEs'
documentation sections, the root README's integration table, the
new-integration issue template, ADR-025's doc links, and the e2e
Playwright capture scripts' output paths. Verified all 251 local links
in the changed docs resolve.

Historical docs/plans/*.md archive entries are intentionally left
untouched — they're frozen snapshots per docs/plans/README.md's own
convention, not live documentation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): drop old personal repo link, switch bridge instructions to plain PowerShell

- Remove remaining references to the old norbert-kulus-blockydevs/openlinker-subiekt
  repo and its without-exe-packaging branch — the bridge now lives directly on
  openlinker-project/openlinker-subiekt-bridge.
- Rewrite "running the bridge" / smoke-test steps as plain Windows PowerShell
  (Invoke-RestMethod) instead of WSL-flavored bash+curl — the bridge always
  runs on Windows; WSL was an artifact of how screenshots were captured for
  this PR, not an operator requirement.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): declutter, crop, and fix tutorial screenshots

Re-captures the KSeF and Subiekt tutorial screenshots against the fully
merged dev branch (all 9 in-flight FE PRs) with three fixes:

1. Wizard field-by-field captures consolidated into one "all fields
   filled" screenshot per wizard (KSeF: 6 shots -> 1; Subiekt: 3 shots -> 1).

2. Noisy/irrelevant data cropped instead of shown in full:
   - Connections list: crop to header + Add-connection button, hiding
     unrelated existing connections.
   - Invoices list: filter by the tutorial's own connection + issued
     status before capturing, instead of showing the full unfiltered
     list (which mixed in dozens of unrelated test rows).
   - Order detail / invoice-issued state: crop above the Sync
     status/Activity/Order Snapshot sections, which aren't part of the
     tutorial narrative.
   - Connection detail page: crop above the "Capabilities" panel, which
     has an unrelated pre-existing bug (renders literal `’` and
     "adapter not recognized" for working connections) surfaced by one
     of the merged branches -- out of scope for this docs PR.

3. Fixed two broken captures:
   - ksef/docs/assets/14-ol-invoice-detail-ksef.png was an "Invoice not
     found" error -- GET /invoices/:invoiceId didn't exist on main yet
     (ships in open PR #1231). Temporarily merged that branch locally to
     capture the real working page, then reverted the merge.
   - subiekt order-detail flow (21-25) used a test order with a
     dangling customerId (no matching customer_projections row) that
     rendered "Couldn't load customer details. Retry". Backed a real
     order (ol_order_ksef_e2e_test_001) with a customer_projections row
     matching its embedded billing address, then drove the actual
     Issue-invoice flow through the live Subiekt bridge end-to-end.

Also drops one redundant intermediate screenshot
(24-ol-invoice-issuing-or-issued.png, identical to 25 once the bridge
issue was fixed) and removes now-orphaned per-field screenshot files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): redact KSeF portal cert/token data, fix platform-picker screenshots

- p3/p4 (KSeF portal — NIP + test cert / sign test request): the test
  certificate's SHA256 fingerprint and ID were shown in plaintext. Redact
  both (they're live, usable values on the shared public test environment,
  same category as the token value already redacted in p8).
- p6 (KSeF portal token list): was showing the full historical token list
  (9+ unrelated tokens: "kolejny", "henha", "teest", ...) instead of just
  the tutorial's own token. Generate a fresh, clearly-named token
  immediately before capturing so it sorts to the top, crop to header +
  that one row.
- 02-ol-platform-picker.png / 07-ol-platform-picker.png: these were
  byte-identical between the KSeF and Subiekt tutorials, but their alt
  text claimed each showed its own platform's card specifically ("KSeF
  card" / "Subiekt nexo card") — neither image actually highlighted
  anything. Hover the relevant card before capturing so each tutorial's
  screenshot genuinely shows what its alt text says.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(ksef): add missing Part 3/4 screenshots, drop unimplemented KOR section

Part 3 (get a B2B order in), Part 4 (issue the invoice), and the Subiekt
cross-reference in "Next steps" had no corresponding OpenLinker screenshots
- three (correction, orders-list, order-detail) were simply never captured.
Fills the gap with a real order (ol_order_e2e_tutorial_001, B2B, company
buyer) driven through orders-list -> order-detail (not issued) ->
connection picker -> ready-to-issue -> issued+accepted, calling the real
KSeF test API.

Also:
- Corrected an inaccurate claim: the tutorial said OpenLinker "pre-selects
  Invoice (faktura VAT) when a NIP is present" — checked
  order-invoice-panel.tsx and the document-type select always defaults to
  'invoice' with no NIP-aware logic. Removed the false claim.
- Removed the entire "Part 6 — Correction invoices (KOR)" section. The
  Issue-correction dialog is real, working FE (KSeF has an
  invoiceCorrectionFlow slot), but actually submitting fails with "Provider
  does not support correction issuance" — KsefInvoicingAdapter doesn't
  implement the CorrectionIssuer capability. Checked all 11 open PRs; none
  add it either, so this isn't a merge-order gap, it's an unbuilt backend
  capability. Replaced with a one-line "coming soon" note in Next steps.
- Removed the "Pair with Subiekt nexo" bullet from Next steps per review —
  the KSeF tutorial should carry zero Subiekt references.
- Renamed/consolidated the local (gitignored) capture scripts used to
  produce these screenshots for future reuse.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(ksef): restore Part 6 (KOR corrections) tutorial with real screenshots

CorrectionIssuer shipped on KsefInvoicingAdapter (#1289), so the correction
flow that was previously removed from the tutorial (backend didn't support
it yet) now works end to end. Captured 4 real screenshots against a live
KSeF sandbox correction: the Issue correction button, the filled-in
correction dialog, the post-submit confirmation, and the invoices list
showing the original + correction rows side by side.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* chore(docs): address tech-review findings - remove orphaned assets and stray .gitkeep files

Delete 34 Subiekt screenshots never referenced by tutorial.md or
README.md (an earlier numbering scheme plus a cut PrestaShop-order
walkthrough section), and two redundant .gitkeep files - one in a
stray top-level libs/integrations/subiekt/assets/ directory
confusable with the real docs/assets/, and one in
libs/integrations/ksef/docs/assets/ now that it holds 22 real
screenshots.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* test(erli): cover #1146 cancellation stock-restore hook (S7)

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(woocommerce): recapture master-shop screenshots in light mode

The 9 WooCommerce master-shop-setup-guide screenshots were dark-mode
(captured before this branch existed, pre-dating the docs relocation).
Recaptured all of them against a live dev stack in light mode, with the
same red-box/arrow callouts drawn programmatically instead of by hand.

Adds two reusable Playwright e2e scripts:
- apps/web/e2e/annotate.mjs: canvas-overlay helper to draw red
  rectangle/ellipse annotations (with optional arrow) onto a page before
  screenshotting, so future tutorial captures don't need a manual
  image-editor pass.
- apps/web/e2e/woocommerce-walkthrough.mjs: drives the WooCommerce
  connection wizard end-to-end and captures all 9 assets referenced from
  master-shop-setup-guide.md, forcing light theme via
  localStorage['openlinker.theme'] regardless of host prefers-color-scheme.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): fix Piotr's review findings on PR #1284

- ksef/README.md: fix wrong KSeF API base URLs (was api-test.ksef.mf.gov.pl/api/v2
  and ksef.mf.gov.pl/api/v2; authoritative ksef-hosts.ts uses a bare /v2 path with
  prod host api.ksef.mf.gov.pl). Also documents the demo tier that was missing.
- ksef/docs/setup-guide.md: refresh from the stale C2-stub narrative (issuance
  throws, RegulatoryTransmitter unimplemented, no seller-profile config) to the
  shipped reality — full FA(3)+KOR issuance, RegulatoryTransmitter and
  CorrectionIssuer implemented, seller block present on KsefConnectionConfig.
- subiekt/docs/tutorial.md: the appsettings.json sample had a fictional
  "HeaderName": "X-Api-Key" field — the real bridge (AuthOptions) only has
  Enabled/ApiKey and hardcodes Authorization: Bearer. Removed the field and
  documented that the client's extra x-bridge-token header is sent but ignored
  by the bridge.
- subiekt/docs/runbook.md: same x-bridge-token clarification.
- woocommerce/README.md: capability table was missing CategoryProvisioner
  (manifest declares 6 capabilities, README listed 5).
- allegro/README.md: ADR-024 link pointed at the adrs/ directory instead of the
  file; repointed to the actual architecture-overview.md#824 section plus the
  correct ADR-024 file (which covers the related OfferManager/ProductPublisher
  split, not #824 itself).

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): add Windows+WSL2 dev quick-setup guide (Presta + OpenLinker + bridge)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): expand PrestaShop run steps + link canonical Getting Started

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): use {{USER_NAME}} placeholder instead of a real Windows username

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): add optional 'launch bridge from WSL' command box

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): document payment-method / bank-account / cash-register per-invoice feature (#1324)

Adds setup-guide Part B2 subsection + tutorial Part 2b with live screenshots; FV-only requirement, multi-payer warning, fixed-Centrala note, advanced config keys.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): fix broken image links in setup-guide (remap to existing assets, drop unbacked shots)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(ksef): payment config (FA(3) Platnosc) tutorial + KOR snapshot semantics

Live-E2E-verified on the KSeF test environment (2026-07-03):
- new tutorial Part 2a - per-connection payment config (method, term,
  bank account, SWIFT, skonto) with fresh screenshots
- setup-guide: config.payment field reference + issuance-time line
  snapshot semantics in the Corrections section (#1297)
- README: Platnosc feature bullet
- re-captured 12-ol-ksef-detail.png with the post-#1320 capability panel

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): address Piotr review round 3 on PR #1284

- strip unmerged #1335 content (Subiekt Part 2b + payment/cash-register
  sections + shots 28-29 + WSL-guide proxy-endpoint step) - rides with
  PR #1335 instead
- fix fabricated credentials/config examples against the real DTOs:
  KSeF (authType+secret, env+nested seller), DPD (login+password,
  payerFid string + required senderAddress), WooCommerce (siteUrl,
  inventory/orders blocks), Allegro (authorization-code flow,
  environment enum + optional keys), InPost (organizationId string,
  senderAddress, -pl sandbox host), Erli (real validator keys,
  ADR-025-correct taxonomy preference, decoder-accurate webhook body),
  AI (OL_AI_DEFAULT_MODEL / OL_AI_OPENAI_MODEL, gpt-4o-mini)
- Subiekt tutorial: manual document-type selection (FE does not
  NIP-preselect; Part 7 no longer instructs relying on auto-Receipt);
  README scopes the NIP rule to the auto-issue path
- sync KSeF/Subiekt capability tables with the adapters' implements
  lists; drop the stale Source layout trees
- align Subiekt /health response shape with the real bridge response
- revert the unrelated Erli S7 int-spec (0c1d07b) - moves to its own PR

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): post-review consolidation fixes on PR #1284

- merge origin/main so the branch carries the shipped FA(3) Platnosc
  feature (#1317, b40902e) that the payment docs describe - the docs
  no longer reference an unmerged feature
- repoint 4 inbound links broken by the docs/integrations -> package
  docs/ move (architecture-overview, getting-started, user-guide 02/04)
- Erli README: capability row now matches ErliOfferManagerAdapter's
  implements list (drop OfferLister/OfferQuantityBatchUpdater, add
  OfferStatusReader/OfferStockRestorer/TaxonomyBorrower)
- align the Part 2a heading dash with sibling headings
- woocommerce-walkthrough.mjs: admin password from OL_ADMIN_PASSWORD
  env instead of a hardcoded shared-instance value

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(plans): repoint dangling links after integrations docs move

The docs/integrations -> libs/integrations/<pkg>/docs/ relocation on
PR #1284 left two frozen implementation-plan docs pointing at the old
paths. Repoint them to the current locations.

Addresses the residual N1 finding from the PR #1284 delta re-review.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): reconcile README/setup-guide shapes with DTOs; e2e cleanup

Address the consolidated /pr-review + /tech-review findings on PR #1284.

IMPORTANT:
- dpd-polska setup-guide: document payerFid as the required numeric id and
  masterFid as optional, matching DpdConnectionConfigDto.
- ksef setup-guide credentials table: the operator submits { authType, secret }
  (raw token); secretRef is platform-assigned, kept in prose only.
- woocommerce README: OrderProcessorManager supports only OrderFulfillmentUpdater
  (drop FulfillmentStatusReader / DestinationOptionsReader over-claim).
- prestashop README: add ProductPublisher + CategoryProvisioner to prose and
  capability table (manifest declares 6).

Minor:
- woocommerce setup-guide: note HTTPS is required (config validator rejects http).
- ksef README: clarify RegulatoryStatusReader is covered via RegulatoryTransmitter.
- apps/web/e2e: parameterize admin credentials via OL_ADMIN_USERNAME/PASSWORD,
  mark author-local defaults, drop dead VARIANT const, fix stale localStorage log
  message, add apps/web/e2e/README.md documenting these as manual capture scripts.
- erli setup-guide: wire in 00-dashboard/01-connections-list; drop redundant
  orphaned 12-order-detail.png.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

---------

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
norbert-kulus-blockydevs pushed a commit that referenced this pull request Jul 22, 2026
… panel copy (#1320)

* fix(connections): widen CoreCapability with Invoicing, fix capability panel copy

The frontend's CoreCapabilityValues union was missing 'Invoicing' even
though the backend has accepted it since ADR-026. This caused the
capabilities panel to show a false "adapter is not recognized" notice
for Invoicing-only connections (e.g. KSeF) with zero recognized
capabilities. Also cleans up the mojibake apostrophe in that message
and drops the now-redundant hardcoded capability enums in the
PrestaShop/WooCommerce setup schemas in favor of CORE_CAPABILITY_VALUES.

Closes #1287

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: jakubret <jakub.retajczyk@blockydevs.com>

* fix(web): widen CoreCapability with ProductPublisher/CategoryProvisioner

The frontend's CoreCapabilityValues was still missing the two shop-listing
capabilities (ADR-024) even after the earlier Invoicing fix, so connections
that support ProductPublisher/CategoryProvisioner had those capabilities
silently filtered out of the toggle panel. Mirrors the backend's
CoreCapabilityValues exactly and adds help copy + a regression test.

Signed-off-by: jakubret <jakub.retajczyk@blockydevs.com>

* docs(connections): amend plan/analysis for PR review findings, apply suggestion fixes

PR review (#1320) found the plan/analysis docs contradicted the shipped
scope (ProductPublisher/CategoryProvisioner widen) and contained factual
errors (Infakt FE form, KSeF file path). Adds a scope-amendment note
covering the WooCommerce silent capability-seed behavior change, corrects
the remaining stale KSeF path reference, drops the hardcoded "8-member"
comment, and documents the ShippingProviderManager drop hazard and the
PS/WC capability-default disagreement.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: jakubret <jakub.retajczyk@blockydevs.com>

---------

Signed-off-by: jakubret <jakub.retajczyk@blockydevs.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
norbert-kulus-blockydevs added a commit that referenced this pull request Jul 22, 2026
… reality check

- ADR-030: fix ksef_data.status mapping (success -> accepted, not cleared) -
  the ADR was re-canonizing exactly the bug the shipped adapter comment
  warns against
- bank-picker docs (BankAccountsReader/BankAccountDefaultSetter, #1310)
  now describe a MERGED feature - #1310 landed to main 2026-07-03,
  after Piotr's review; no doc changes needed, kept as-is post branch update
- setup-guide step 5: replace the nonexistent "Rotate webhook secret" FE
  button with the actual API call (curl snippet against
  POST /v1/connections/:id/webhooks/secret/rotate); invert the
  secret-exchange framing to lead with what if4's screenshot actually
  shows (no secret field) and mark the paste-into-inFakt direction
  explicitly unverified
- README: add defaultPaymentMethod + bankAccount to the Config JSON
  example (InfaktConnectionConfig carries both since #1309/#1310)
- plan: retarget addendum noting the branch now targets main with all
  prereqs merged
- merged origin/main (branch was behind #1297/#1329/#1310/#1320/#1331)

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
norbert-kulus-blockydevs added a commit that referenced this pull request Jul 22, 2026
… Subiekt nexo (#1284)

* docs(integrations): add README + operator tutorials for all 8 adapter packages

Add per-package README.md to every integration package that was missing one:
ai, allegro, dpd-polska, erli, inpost, ksef, subiekt, woocommerce.
Each README covers adapter key + capabilities, credentials/config shape,
and links to further operator docs.

Add full A-to-Z operator tutorials for KSeF and Subiekt nexo with per-step
screenshot placeholders (ksef/tutorial.md, subiekt/tutorial.md). The Subiekt
tutorial covers bridge setup via PowerShell/WSL (without-exe-packaging branch),
wizard, B2B faktura, B2C paragon, and idempotency. The KSeF tutorial covers
token generation on the MF portal, connection wizard, B2B order, issuance, and
UPO download.

Create libs/integrations/ksef/assets/ and libs/integrations/subiekt/assets/
directories for future screenshot captures.

Update root README Integrations table to link the tutorial.md files for KSeF
and Subiekt nexo.

Closes #1265
Closes #1266

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NQB4zBWSrneR71TRKkx1t
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): add real Playwright screenshots + rewrite KSeF and Subiekt tutorials

Replaces all placeholder screenshot references in KSeF and Subiekt nexo
tutorials with actual Playwright captures taken against a live OpenLinker
instance (preview build with all in-flight FE PRs merged).

KSeF assets (14 PNGs):
  01-02: connections list + platform picker
  03-09: wizard fields (name, env, NIP, address, auth-type, secret)
  10-12: connection created, list, detail page
  13-14: invoices list with regulatory badges, invoice detail

Subiekt assets (18 PNGs):
  06-15: connection wizard (empty -> filled -> created -> test -> list -> detail)
  20-26: invoice flow (orders list, order detail, connection picker,
          ready-to-issue, issue clicked, issued state, invoices list)

Tutorial rewrites:
  - ksef/tutorial.md: reordered around actual wizard fields; Part 1 (KSeF portal)
    marked manual; Parts 2-5 use real screenshot refs
  - subiekt/tutorial.md: full rewrite to match connection-picker flow (multiple
    Invoicing connections), real bridge startup instructions, TLS note, idempotency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): add real Subiekt nexo FS document screenshot to tutorial

Part 5 (verify in Subiekt nexo) was the only remaining manual-step
placeholder without a real capture. Replaces it with an actual screenshot
of an issued FS document open in Subiekt nexo desktop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(ksef): add real KSeF 2.0 test-portal screenshots for token generation

Part 1 (get a KSeF authorisation token) was the last manual-step
placeholder. Captures the full flow on the live ap-test.ksef.mf.gov.pl
portal: test-auth login, NIP + test certificate, dashboard, token list,
generate-token form, and the revealed token (value redacted before commit
since it's a live, usable test-environment credential).

Also corrects the test-portal URL: ksef-test.mf.gov.pl (KSeF 1.0) was
decommissioned 2025-09-01; the current test environment is
ap-test.ksef.mf.gov.pl (KSeF 2.0).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): point to the openlinker-subiekt-bridge repo

The bridge is being moved to its own repo under the openlinker-project
org (not yet published). Update README + tutorial repo links and clone
paths accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): move all integration docs + assets under libs/integrations/<pkg>/docs/

Establishes one consistent convention across all 8 integration packages:
docs (setup guides, runbooks, tutorials) and their image assets live at
libs/integrations/<pkg>/docs/ and libs/integrations/<pkg>/docs/assets/,
co-located with the code they document instead of split across a separate
docs/integrations/<pkg>/ tree.

Moves (via git mv, history preserved):
- docs/integrations/<pkg>/*.md -> libs/integrations/<pkg>/docs/*.md
  (allegro, dpd-polska, erli, inpost, ksef, prestashop, subiekt, woocommerce)
- docs/integrations/woocommerce/screenshots/ -> .../woocommerce/docs/assets/
- docs/assets/erli/ -> libs/integrations/erli/docs/assets/
- docs/assets/subiekt/ -> libs/integrations/subiekt/docs/assets/
  (merged with the tutorial screenshots already at .../subiekt/assets/,
  no filename collisions)
- libs/integrations/{ksef,subiekt}/tutorial.md -> .../docs/tutorial.md
- libs/integrations/{ksef,subiekt}/assets/ -> .../docs/assets/

Rewrites every relative link and image reference in the moved files
(directory depth changed by one level), updates the 8 package READMEs'
documentation sections, the root README's integration table, the
new-integration issue template, ADR-025's doc links, and the e2e
Playwright capture scripts' output paths. Verified all 251 local links
in the changed docs resolve.

Historical docs/plans/*.md archive entries are intentionally left
untouched — they're frozen snapshots per docs/plans/README.md's own
convention, not live documentation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): drop old personal repo link, switch bridge instructions to plain PowerShell

- Remove remaining references to the old norbert-kulus-blockydevs/openlinker-subiekt
  repo and its without-exe-packaging branch — the bridge now lives directly on
  openlinker-project/openlinker-subiekt-bridge.
- Rewrite "running the bridge" / smoke-test steps as plain Windows PowerShell
  (Invoke-RestMethod) instead of WSL-flavored bash+curl — the bridge always
  runs on Windows; WSL was an artifact of how screenshots were captured for
  this PR, not an operator requirement.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): declutter, crop, and fix tutorial screenshots

Re-captures the KSeF and Subiekt tutorial screenshots against the fully
merged dev branch (all 9 in-flight FE PRs) with three fixes:

1. Wizard field-by-field captures consolidated into one "all fields
   filled" screenshot per wizard (KSeF: 6 shots -> 1; Subiekt: 3 shots -> 1).

2. Noisy/irrelevant data cropped instead of shown in full:
   - Connections list: crop to header + Add-connection button, hiding
     unrelated existing connections.
   - Invoices list: filter by the tutorial's own connection + issued
     status before capturing, instead of showing the full unfiltered
     list (which mixed in dozens of unrelated test rows).
   - Order detail / invoice-issued state: crop above the Sync
     status/Activity/Order Snapshot sections, which aren't part of the
     tutorial narrative.
   - Connection detail page: crop above the "Capabilities" panel, which
     has an unrelated pre-existing bug (renders literal `’` and
     "adapter not recognized" for working connections) surfaced by one
     of the merged branches -- out of scope for this docs PR.

3. Fixed two broken captures:
   - ksef/docs/assets/14-ol-invoice-detail-ksef.png was an "Invoice not
     found" error -- GET /invoices/:invoiceId didn't exist on main yet
     (ships in open PR #1231). Temporarily merged that branch locally to
     capture the real working page, then reverted the merge.
   - subiekt order-detail flow (21-25) used a test order with a
     dangling customerId (no matching customer_projections row) that
     rendered "Couldn't load customer details. Retry". Backed a real
     order (ol_order_ksef_e2e_test_001) with a customer_projections row
     matching its embedded billing address, then drove the actual
     Issue-invoice flow through the live Subiekt bridge end-to-end.

Also drops one redundant intermediate screenshot
(24-ol-invoice-issuing-or-issued.png, identical to 25 once the bridge
issue was fixed) and removes now-orphaned per-field screenshot files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): redact KSeF portal cert/token data, fix platform-picker screenshots

- p3/p4 (KSeF portal — NIP + test cert / sign test request): the test
  certificate's SHA256 fingerprint and ID were shown in plaintext. Redact
  both (they're live, usable values on the shared public test environment,
  same category as the token value already redacted in p8).
- p6 (KSeF portal token list): was showing the full historical token list
  (9+ unrelated tokens: "kolejny", "henha", "teest", ...) instead of just
  the tutorial's own token. Generate a fresh, clearly-named token
  immediately before capturing so it sorts to the top, crop to header +
  that one row.
- 02-ol-platform-picker.png / 07-ol-platform-picker.png: these were
  byte-identical between the KSeF and Subiekt tutorials, but their alt
  text claimed each showed its own platform's card specifically ("KSeF
  card" / "Subiekt nexo card") — neither image actually highlighted
  anything. Hover the relevant card before capturing so each tutorial's
  screenshot genuinely shows what its alt text says.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(ksef): add missing Part 3/4 screenshots, drop unimplemented KOR section

Part 3 (get a B2B order in), Part 4 (issue the invoice), and the Subiekt
cross-reference in "Next steps" had no corresponding OpenLinker screenshots
- three (correction, orders-list, order-detail) were simply never captured.
Fills the gap with a real order (ol_order_e2e_tutorial_001, B2B, company
buyer) driven through orders-list -> order-detail (not issued) ->
connection picker -> ready-to-issue -> issued+accepted, calling the real
KSeF test API.

Also:
- Corrected an inaccurate claim: the tutorial said OpenLinker "pre-selects
  Invoice (faktura VAT) when a NIP is present" — checked
  order-invoice-panel.tsx and the document-type select always defaults to
  'invoice' with no NIP-aware logic. Removed the false claim.
- Removed the entire "Part 6 — Correction invoices (KOR)" section. The
  Issue-correction dialog is real, working FE (KSeF has an
  invoiceCorrectionFlow slot), but actually submitting fails with "Provider
  does not support correction issuance" — KsefInvoicingAdapter doesn't
  implement the CorrectionIssuer capability. Checked all 11 open PRs; none
  add it either, so this isn't a merge-order gap, it's an unbuilt backend
  capability. Replaced with a one-line "coming soon" note in Next steps.
- Removed the "Pair with Subiekt nexo" bullet from Next steps per review —
  the KSeF tutorial should carry zero Subiekt references.
- Renamed/consolidated the local (gitignored) capture scripts used to
  produce these screenshots for future reuse.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014S9kgctitB75BfHEDejJ6B
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(ksef): restore Part 6 (KOR corrections) tutorial with real screenshots

CorrectionIssuer shipped on KsefInvoicingAdapter (#1289), so the correction
flow that was previously removed from the tutorial (backend didn't support
it yet) now works end to end. Captured 4 real screenshots against a live
KSeF sandbox correction: the Issue correction button, the filled-in
correction dialog, the post-submit confirmation, and the invoices list
showing the original + correction rows side by side.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* chore(docs): address tech-review findings - remove orphaned assets and stray .gitkeep files

Delete 34 Subiekt screenshots never referenced by tutorial.md or
README.md (an earlier numbering scheme plus a cut PrestaShop-order
walkthrough section), and two redundant .gitkeep files - one in a
stray top-level libs/integrations/subiekt/assets/ directory
confusable with the real docs/assets/, and one in
libs/integrations/ksef/docs/assets/ now that it holds 22 real
screenshots.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* test(erli): cover #1146 cancellation stock-restore hook (S7)

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(woocommerce): recapture master-shop screenshots in light mode

The 9 WooCommerce master-shop-setup-guide screenshots were dark-mode
(captured before this branch existed, pre-dating the docs relocation).
Recaptured all of them against a live dev stack in light mode, with the
same red-box/arrow callouts drawn programmatically instead of by hand.

Adds two reusable Playwright e2e scripts:
- apps/web/e2e/annotate.mjs: canvas-overlay helper to draw red
  rectangle/ellipse annotations (with optional arrow) onto a page before
  screenshotting, so future tutorial captures don't need a manual
  image-editor pass.
- apps/web/e2e/woocommerce-walkthrough.mjs: drives the WooCommerce
  connection wizard end-to-end and captures all 9 assets referenced from
  master-shop-setup-guide.md, forcing light theme via
  localStorage['openlinker.theme'] regardless of host prefers-color-scheme.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): fix Piotr's review findings on PR #1284

- ksef/README.md: fix wrong KSeF API base URLs (was api-test.ksef.mf.gov.pl/api/v2
  and ksef.mf.gov.pl/api/v2; authoritative ksef-hosts.ts uses a bare /v2 path with
  prod host api.ksef.mf.gov.pl). Also documents the demo tier that was missing.
- ksef/docs/setup-guide.md: refresh from the stale C2-stub narrative (issuance
  throws, RegulatoryTransmitter unimplemented, no seller-profile config) to the
  shipped reality — full FA(3)+KOR issuance, RegulatoryTransmitter and
  CorrectionIssuer implemented, seller block present on KsefConnectionConfig.
- subiekt/docs/tutorial.md: the appsettings.json sample had a fictional
  "HeaderName": "X-Api-Key" field — the real bridge (AuthOptions) only has
  Enabled/ApiKey and hardcodes Authorization: Bearer. Removed the field and
  documented that the client's extra x-bridge-token header is sent but ignored
  by the bridge.
- subiekt/docs/runbook.md: same x-bridge-token clarification.
- woocommerce/README.md: capability table was missing CategoryProvisioner
  (manifest declares 6 capabilities, README listed 5).
- allegro/README.md: ADR-024 link pointed at the adrs/ directory instead of the
  file; repointed to the actual architecture-overview.md#824 section plus the
  correct ADR-024 file (which covers the related OfferManager/ProductPublisher
  split, not #824 itself).

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): add Windows+WSL2 dev quick-setup guide (Presta + OpenLinker + bridge)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): expand PrestaShop run steps + link canonical Getting Started

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): use {{USER_NAME}} placeholder instead of a real Windows username

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): add optional 'launch bridge from WSL' command box

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): document payment-method / bank-account / cash-register per-invoice feature (#1324)

Adds setup-guide Part B2 subsection + tutorial Part 2b with live screenshots; FV-only requirement, multi-payer warning, fixed-Centrala note, advanced config keys.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(subiekt): fix broken image links in setup-guide (remap to existing assets, drop unbacked shots)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(ksef): payment config (FA(3) Platnosc) tutorial + KOR snapshot semantics

Live-E2E-verified on the KSeF test environment (2026-07-03):
- new tutorial Part 2a - per-connection payment config (method, term,
  bank account, SWIFT, skonto) with fresh screenshots
- setup-guide: config.payment field reference + issuance-time line
  snapshot semantics in the Corrections section (#1297)
- README: Platnosc feature bullet
- re-captured 12-ol-ksef-detail.png with the post-#1320 capability panel

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): address Piotr review round 3 on PR #1284

- strip unmerged #1335 content (Subiekt Part 2b + payment/cash-register
  sections + shots 28-29 + WSL-guide proxy-endpoint step) - rides with
  PR #1335 instead
- fix fabricated credentials/config examples against the real DTOs:
  KSeF (authType+secret, env+nested seller), DPD (login+password,
  payerFid string + required senderAddress), WooCommerce (siteUrl,
  inventory/orders blocks), Allegro (authorization-code flow,
  environment enum + optional keys), InPost (organizationId string,
  senderAddress, -pl sandbox host), Erli (real validator keys,
  ADR-025-correct taxonomy preference, decoder-accurate webhook body),
  AI (OL_AI_DEFAULT_MODEL / OL_AI_OPENAI_MODEL, gpt-4o-mini)
- Subiekt tutorial: manual document-type selection (FE does not
  NIP-preselect; Part 7 no longer instructs relying on auto-Receipt);
  README scopes the NIP rule to the auto-issue path
- sync KSeF/Subiekt capability tables with the adapters' implements
  lists; drop the stale Source layout trees
- align Subiekt /health response shape with the real bridge response
- revert the unrelated Erli S7 int-spec (0c1d07b) - moves to its own PR

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): post-review consolidation fixes on PR #1284

- merge origin/main so the branch carries the shipped FA(3) Platnosc
  feature (#1317, b40902e) that the payment docs describe - the docs
  no longer reference an unmerged feature
- repoint 4 inbound links broken by the docs/integrations -> package
  docs/ move (architecture-overview, getting-started, user-guide 02/04)
- Erli README: capability row now matches ErliOfferManagerAdapter's
  implements list (drop OfferLister/OfferQuantityBatchUpdater, add
  OfferStatusReader/OfferStockRestorer/TaxonomyBorrower)
- align the Part 2a heading dash with sibling headings
- woocommerce-walkthrough.mjs: admin password from OL_ADMIN_PASSWORD
  env instead of a hardcoded shared-instance value

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(plans): repoint dangling links after integrations docs move

The docs/integrations -> libs/integrations/<pkg>/docs/ relocation on
PR #1284 left two frozen implementation-plan docs pointing at the old
paths. Repoint them to the current locations.

Addresses the residual N1 finding from the PR #1284 delta re-review.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(integrations): reconcile README/setup-guide shapes with DTOs; e2e cleanup

Address the consolidated /pr-review + /tech-review findings on PR #1284.

IMPORTANT:
- dpd-polska setup-guide: document payerFid as the required numeric id and
  masterFid as optional, matching DpdConnectionConfigDto.
- ksef setup-guide credentials table: the operator submits { authType, secret }
  (raw token); secretRef is platform-assigned, kept in prose only.
- woocommerce README: OrderProcessorManager supports only OrderFulfillmentUpdater
  (drop FulfillmentStatusReader / DestinationOptionsReader over-claim).
- prestashop README: add ProductPublisher + CategoryProvisioner to prose and
  capability table (manifest declares 6).

Minor:
- woocommerce setup-guide: note HTTPS is required (config validator rejects http).
- ksef README: clarify RegulatoryStatusReader is covered via RegulatoryTransmitter.
- apps/web/e2e: parameterize admin credentials via OL_ADMIN_USERNAME/PASSWORD,
  mark author-local defaults, drop dead VARIANT const, fix stale localStorage log
  message, add apps/web/e2e/README.md documenting these as manual capture scripts.
- erli setup-guide: wire in 00-dashboard/01-connections-list; drop redundant
  orphaned 12-order-detail.png.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

---------

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
norbert-kulus-blockydevs added a commit that referenced this pull request Jul 22, 2026
… reality check

- ADR-030: fix ksef_data.status mapping (success -> accepted, not cleared) -
  the ADR was re-canonizing exactly the bug the shipped adapter comment
  warns against
- bank-picker docs (BankAccountsReader/BankAccountDefaultSetter, #1310)
  now describe a MERGED feature - #1310 landed to main 2026-07-03,
  after Piotr's review; no doc changes needed, kept as-is post branch update
- setup-guide step 5: replace the nonexistent "Rotate webhook secret" FE
  button with the actual API call (curl snippet against
  POST /v1/connections/:id/webhooks/secret/rotate); invert the
  secret-exchange framing to lead with what if4's screenshot actually
  shows (no secret field) and mark the paste-into-inFakt direction
  explicitly unverified
- README: add defaultPaymentMethod + bankAccount to the Config JSON
  example (InfaktConnectionConfig carries both since #1309/#1310)
- plan: retarget addendum noting the branch now targets main with all
  prereqs merged
- merged origin/main (branch was behind #1297/#1329/#1310/#1320/#1331)

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
piotrswierzy added a commit that referenced this pull request Jul 23, 2026
…1307)

* docs(infakt): add first 4 manual inFakt-dashboard walkthrough screenshots

Part of the E2E evidence trail for PR #1300 / issue #1282: inFakt
sandbox dashboard login, API key generation page, and the webhook
creation flow (list + new-webhook form). Captured manually against
the real inFakt sandbox dashboard, no secrets visible in frame.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): add real inFakt E2E screenshots (connection, issuance, KOR, list)

Captured against the real inFakt sandbox on a temporary paired stack
(this branch's web build + the 1281-infakt-plugin-registration-webhook
backend branch), confirming the full connect -> issue -> KSeF-clearance
-> correction flow works end to end through OpenLinker:

- 00-05: guided connection setup, Test connection (passing, after the
  ConnectionTesterPort fix landed on PR #1293), connections list
- 12: invoice accepted with real KSeF clearance number
  (8201194127-20260701-A5797F400000-ED)
- 14-16: KOR correction flow, also cleared by the real sandbox
- 17: invoices list showing the original + correction, both accepted
- if1-if4: manual inFakt-dashboard screenshots (API key, webhooks)

Known gaps (tracked, not blocking):
- 13-invoice-detail-page was captured via the /invoices/:invoiceId page,
  but that GET route doesn't exist yet on the 1281 backend branch's base
  main snapshot — will be trivial to recapture once #1292/#1293 land on
  current main.
- The not-issued / submitted (pending) order-detail states aren't
  captured cleanly yet — the seeded test order is now terminal
  (accepted) for this connection; a second seeded order would be needed
  for a clean before/during capture.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): drop broken invoice-detail-page screenshot (route missing on this backend branch, not blocking)

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): re-capture E2E screenshots with the money-format fix verified

Re-ran the full sandbox walkthrough on a fresh order (PLN 189.00) after
the groszy/decimal-string fix landed on PR #1293 (651cac2). Confirmed
against inFakt's raw API response that amounts now round-trip exactly
(gross_price: 18900 groszy = PLN 189.00) and the KOR correction combines
original + corrected lines correctly (189.00 + 99.99 = 288.99 PLN).

Also adds the invoice-detail-page screenshot (13) that 404'd on a stale
branch snapshot last time — the route works fine now.

Replaces the earlier PLN 349.00 test order's screenshots, which
(correctly, at the time) showed the ~100x-low amounts that led to the
money-format bug report on PR #1293.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): move E2E screenshots to libs/integrations/infakt/docs/assets/

Aligns with the convention established in PR #1284 (KSeF/Subiekt
tutorials) — screenshot assets live inside the integration package's
own docs/assets/, not a root-level docs/assets/<provider>/ directory.
Updates the two e2e scripts' output path accordingly.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): add clean not-issued/submitted screenshots + fresh Part 6 confirmation

- 08-orders-list.png: clean, filtered (sourceConnectionId + createdFrom)
  view of just the seeded test orders — the unfiltered list is too
  cluttered with other sessions' dev-DB fixtures to be tutorial-usable.
- 10/11: genuinely clean not-issued -> submitted transition, captured
  without a page reload wiping the connection-picker selection (fixed
  infakt-invoice.mjs to shoot the submitted state before any reload).
- if5-infakt-invoice-confirmed.png: fresh manual inFakt-dashboard
  screenshot confirming the money-format fix (9/07/2026 = PLN 189.00,
  10/07/2026 correction = PLN 288.99), replacing the pre-fix evidence.
- 13/17 updated: also documents the KSeF cleared-vs-accepted mapping bug
  found this run (flagged on PR #1293) — two rows show "KSeF: CLEARING"
  (the real reconcile job's output, unpatched) alongside two "KSeF:
  ACCEPTED" rows from earlier runs where I'd manually corrected the DB
  while chasing the money bug. Will re-capture once the accepted-mapping
  fix lands.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): re-capture screenshots with the cleared->accepted fix verified

Fourth fresh sandbox order (PLN 259.00), confirming both backend fixes
together: gross_price round-trips exactly (25900 groszy = PLN 259.00),
and the invoice now shows "KSeF: ACCEPTED" with a real clearance
reference chip instead of getting stuck on "KSeF: CLEARING" forever.
Correction verified too (259.00 + 99.99 = 358.99 PLN exact, gross_price
35899 groszy).

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): ADR-030 KSeF indirection model + operator setup guide

Documents why InfaktInvoicingAdapter implements RegulatoryStatusReader
(not RegulatoryTransmitter) — inFakt auto-submits to KSeF on its own,
so OL only ever reads clearance status back. Adds the operator setup
guide (connection creation, webhook configuration, troubleshooting),
the package README the infakt adapter was missing, and the
architecture-overview.md provider entry.

Part of #1279. Closes #1283.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): payment method, bank-account picker, PDF download in setup guide

Live-E2E-verified against the inFakt sandbox (2026-07-03):
- section 1: Default payment method wizard field + Transfer bank-account
  behaviour (live picker on the Edit form, eager persist, inFakt default
  sync) with fresh wizard + edit-form screenshots
- section 3: Download the invoice PDF step (rendered PDF via
  RegulatoryDocumentReader, #1321)
- corrections: issuance-time line snapshot note (#1297)
- README: BankAccountsReader / BankAccountDefaultSetter /
  RegulatoryDocumentReader notes + implementation details
- capability-panel screenshot (post-#1320)

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): address #1307 review - accepted mapping, webhook-secret reality check

- ADR-030: fix ksef_data.status mapping (success -> accepted, not cleared) -
  the ADR was re-canonizing exactly the bug the shipped adapter comment
  warns against
- bank-picker docs (BankAccountsReader/BankAccountDefaultSetter, #1310)
  now describe a MERGED feature - #1310 landed to main 2026-07-03,
  after Piotr's review; no doc changes needed, kept as-is post branch update
- setup-guide step 5: replace the nonexistent "Rotate webhook secret" FE
  button with the actual API call (curl snippet against
  POST /v1/connections/:id/webhooks/secret/rotate); invert the
  secret-exchange framing to lead with what if4's screenshot actually
  shows (no secret field) and mark the paste-into-inFakt direction
  explicitly unverified
- README: add defaultPaymentMethod + bankAccount to the Config JSON
  example (InfaktConnectionConfig carries both since #1309/#1310)
- plan: retarget addendum noting the branch now targets main with all
  prereqs merged
- merged origin/main (branch was behind #1297/#1329/#1310/#1320/#1331)

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* fix(docs): fix inFakt ADR-030's misleading no-submit-primitive framing

The earlier review-fix commit (999dda5) addressed the /pr-review's four
numbered findings but missed the tech-lead draft review's BLOCKING finding:
ADR-030, the setup guide, and the README all claimed OL "has no submit
primitive to call" and that inFakt "auto-triggers" KSeF submission on its
own. The shipped adapter's own docstring says otherwise: an inFakt draft
does NOT auto-submit on its own, so issueInvoice/issueCorrection call
send_to_ksef.json explicitly and inline - verified live 2026-07-01.

Reworded throughout to the framing the reviewer suggested: OL retains an
out-of-port sendToKsef trigger, not surfaced as RegulatoryTransmitter,
because clearance timing and status ownership stay with inFakt - not
because there is nothing for OL to call. Also disambiguates the three
webhook classes in the README (InfaktWebhookTranslator,
InfaktInboundWebhookDecoderAdapter, InfaktWebhookEventTranslatorAdapter),
per the same draft review's suggestion, which the prior commit also left
unaddressed.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): move setup-guide.md to libs/integrations/infakt/docs/ for convention parity

Every other integration (allegro, dpd-polska, erli, inpost, ksef, subiekt,
woocommerce) already lives at libs/integrations/<name>/docs/setup-guide.md
after the recent doc-location convention change on main. inFakt's guide had
already moved its screenshots there but left the markdown file behind at the
old top-level docs/integrations/infakt/ location. Move the file alongside its
assets and fix every cross-reference (ADR-030, package README,
architecture-overview.md).

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): catch up ADR-030/README/setup-guide/capabilities.md to the 4 sub-capabilities shipped since #1307's last update

InfaktInvoicingAdapter now implements 10 Invoicing sub-capabilities;
this branch's docs only covered 6 (missing RegulatoryResubmitter #1356,
PaymentStatusReader #1354, PaymentMarker #1362, InvoiceEmailSender #1353).
Also fixes a since-stale claim that invoice_marked_as_paid webhooks are
ignored (they now drive PaymentStatusReader via #1354/#1361), documents
the dedicated corrective_invoices.json endpoint (#1342), and adds the
per-connection shipping-line label override (#1517/#1562).

docs/capabilities.md and architecture-overview.md's InvoicingPort
sub-capability list had the same 6-of-10 staleness independent of this
branch - fixed alongside since they're the same underlying gap.

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(infakt): correct webhook-secret injection to env-var mechanism

The webhook-secret exchange direction is now confirmed by the merged
ingestion integration test (#1555): inFakt auto-generates the secret per
subscription and the operator injects it into OL via
OPENLINKER_WEBHOOK_SECRET__INFAKT[__<CONNECTION_ID>]. The secret/rotate
endpoint is the wrong tool (generates a random secret inFakt never sees).

Removes the unverified "known gap" framing; keeps the accurate residual
limitation (no set-arbitrary-secret endpoint / FE affordance yet).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

* docs(invoicing): document DocumentNumberConsumer capability + note ADR-030 roster

- capabilities.md: add the DocumentNumberConsumer (#1575) invoicing
  sub-capability row and bump the InvoicingPort count 12 -> 13 to match
  the 13 capability files on disk (the row was missing on main too; this
  PR owns the count since it re-tallied the section).
- ADR-030: add a scope note that the adapter accreted further
  sub-capabilities post-decision, pointing at the README / architecture
  -overview for the full code-synced roster instead of restating it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>

---------

Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
Signed-off-by: Peter Swierzy <123735851+piotrswierzy@users.noreply.github.com>
Co-authored-by: Peter Swierzy <123735851+piotrswierzy@users.noreply.github.com>
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.

[BUG] Frontend — ConnectionCapabilitiesPanel shows misleading "adapter not recognized" text for Invoicing-only connections

3 participants