Skip to content

Sync guard - #515

Merged
corrin merged 6 commits into
productionfrom
main
Aug 1, 2026
Merged

Sync guard#515
corrin merged 6 commits into
productionfrom
main

Conversation

@corrin

@corrin corrin commented Aug 1, 2026

Copy link
Copy Markdown
Owner

📝 Description

Short explanation of what you’ve built and why.

🔗 Related Jira Work Item

Jira: KAN-123

Use the uppercase Jira key (KAN-123) in the PR title or body so GitHub for
Jira links the development event. Jira Automation owns the transition to Done
when the PR is merged.

🚀 Changes

  • Bullet-list of feature additions or fixes (e.g. extracted useChat composable, split ChatHistory and ChatInput components, added Pinia store).

✅ Checklist

Vue.js (Composition API)

  • Used Composition API (<script setup> & composables), no heavy logic in templates
  • UI logic extracted to reusable composables (useChat, etc.)
  • Components are focused & small (<200 LOC)
  • Communication via props and emit, no direct parent/child ref duplication
  • State management in Pinia; no ad-hoc reactive globals
  • Routes/components lazy-loaded where appropriate

Quality & Formatting

  • Passes Prettier (npx prettier --check .)
  • Passes ESLint with zero warnings (npx eslint . --ext .js,.ts,.vue)
  • Added JSDoc comments for all props and emitted events
  • New or updated unit/E2E tests included

Definition of Done

  • Browser JavaScript console checked for relevant warnings/errors
  • Django/server console checked for relevant warnings/errors
  • Build, type-check, schema, and OpenAPI warnings reviewed; no new unexplained warnings
  • Weak frontend typing such as avoidable any or loose passthrough types reviewed
  • Affected business workflow regression-tested
  • User-facing workflow still makes sense for the relevant business user

See docs/jira-usage.md#required-checks.

corrin and others added 6 commits August 1, 2026 22:04
An audit of user-facing strings in the last release found the Finish Job
copy asserting processes KAN-323 never specified. Corrections, per the
office's actual rules:

- Over-invoiced is a diagnostic, not advice: a credit note is only one
  possible resolution — the job value being out of date is another — so
  the warning now names the fact and both likely causes, prescribing
  neither.
- The load-error panel no longer instructs staff not to quote the
  customer; the T&M "get them right before invoicing" paragraph is
  deleted outright (the ticket forbids the checklist area nagging staff).
- Timesheets only exist to invoice on a T&M job, so a quoted job is no
  longer asked "Have you collected the timesheet entries?".
- "Has the job been released?" becomes "Has the job been handed over?",
  matching the field's meaning (collection, delivery, or on-site install).

KAN-323

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnuHL7w3UisSk6KQ81q3Qf
True, but not something the office needs telling; the behaviour is
pinned by a test, not by copy. The subtitle keeps "Recorded against
the job." so staff know ticks persist.

KAN-323

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnuHL7w3UisSk6KQ81q3Qf
- "Self-checklist." replaces "Recorded against the job." — every field
  is recorded against the job, so that said nothing.
- Supervisor, not foreman — the term the workshop actually uses. The
  foreman_signed_off column keeps its name; only the label changes.
- "today's timesheet entries" — says which timesheets are meant.
- The materials question now asks what the check actually is: the
  workshop forgetting to write materials used on the job sheet, or
  writing them wrongly — not a vague "checked the materials".

KAN-323

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnuHL7w3UisSk6KQ81q3Qf
A merged company's numbers live on the company it was merged into, but
its archived Xero contact keeps the phones and is still fetched with
include_archived=True. Every sync then collides with the winner's rows
under the one-number-one-company rule, hard-failing the company and
persisting an AppError — 105 of them in production.

No prod-only remedy exists: blanking the number gets re-synced from
Xero, and merging in Xero doesn't strip the archived contact's phones.
sync_xero_phone_methods now returns early for a merged company; the
next sync clears the whole backlog at once. A test pins the exact
collision scenario.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PnuHL7w3UisSk6KQ81q3Qf
fix: stop the Finish tab prescribing business process it invented (KAN-323)
fix: skip Xero phone sync for merged companies
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec895b3b-ded5-4f76-aefc-970790a06061

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@corrin
corrin merged commit 33ac025 into production Aug 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant