Docs/Upgrading to 2.0

Upgrading to 2.0

Accordee 2.0 adds Leads, Network, Invoices, Emails and Whiteboards, and changes a few files every module shares. Here's what changed and how to bring 2.0 into a project you've already customized.

Do you need this page?

Only if you started from 1.0.0, 1.0.1 or 1.1.0 and changed the code. If you haven't changed anything, replace your copy with the latest version as Getting updates describes. 2.0, 2.1 and 2.2 add no new packages, so npm ci installs the same dependencies as 1.1.0. Already on 2.0 or 2.1? The Changelog's v2.1.0 and v2.2.0 entries list the files each one changed.

What's new

ModuleRouteCode
Leads/leads, /leads/[id]components/leads/
Network/network, /network/[id]components/network/
Invoices/invoicescomponents/invoices/
Emails/emailscomponents/emails/
Whiteboards/whiteboards, /whiteboards/[id]components/whiteboards/, lib/whiteboard/
ChartsDashboard and customer Overviewcomponents/charts/

Plus a font setting, Settings › Pipeline, new dashboard cards, new workflow triggers and Rune answers about leads, people, invoices, email and boards. The Changelog lists everything.

Files that changed

New folders copy over without conflicts. These shared files changed too; if you edited them, merge by hand.

AreaFilesWhat changed
Providerscomponents/providers/crm-providers.tsxFour new providers and a new order (below)
Sidebar and searchlib/data/preferences.ts, shell/nav-meta.ts, shell/sidebar.tsx, shell/app-header.tsx, search/command-palette.tsxNew pages, shortcuts (G then P, R, F, V, L) and search results
Preferenceslib/data/preferences.tsNew font and mailbox fields and new NavId values
Invoices and paymentsproviders/invoices-provider.tsx, lib/data/billing.tsNow owns every invoice and payment. Balances, Transactions, customer Billing, contract Invoices, the dashboard and ⌘K read them through useInvoices()
Customersproviders/customers-provider.tsxNew updateContact, removeContact and restoreContact
Dashboardslib/data/dashboards.ts, components/home/New card types, Pipeline and Relationships dashboards; Panel and row moved to home/panel.tsx
Workflowslib/data/workflows.ts, lib/workflow-engine.tsLead triggers, Relationship goes cold, Assign owner; overdue invoices read live data
Runelib/chat.ts, providers/chat-provider.tsxA wider ReplyContext (pipeline, boards, network, mailbox) and new answer files
Linksrecords/record-link.tsxContacts open /network/[id]; invoices open /invoices
Stylesapp/globals.css, app/layout.tsx, app/fonts/Font sets, chart and whiteboard styles
Provider order in 2.0
Toast > Shell > Favorites > Preferences > Admin > Customers > Contracts >
Comms > Leads > Whiteboards > Inbox > Emails > Meetings > Invoices >
Network > Workflows > Chat > Documents

If you connected a backend by changing screens to load invoices or payments themselves, move that loading into InvoicesProvider. In 2.0 the screens no longer import INVOICES, BALANCES or TRANSACTIONS, so your changes there would be bypassed.

Upgrade step by step

Commit your work, and note the version you're on (the version in package.json).

Merge 2.0 on a branch, as Getting updates shows. Git flags the shared files above where you and 2.0 both made changes.

Resolve crm-providers.tsx first: take 2.0's order, then add back any providers of your own, below the ones they read from.

Resolve the sidebar files next. Keep your own pages, and add 2.0's new ids to NavId, NAV_META and NAV_KEYS. If you used one of the new shortcuts for something else, pick another key for one of them.

If you connected a backend, check each provider you changed against 2.0's version. Keep your loading code and adopt any new actions.

Install and run every check:

npm ci && npm run lint && npm run typecheck && npm run build

Prompt for an AI coding tool

If you'd rather have your AI coding tool do the merge, unzip 2.0 next to your project and give it this:

Prompt
The folder ../accordee-v2.2.0 is the latest Accordee. My project
started from a 1.x version and I've customized it.

1. Read ../accordee-v2.2.0/CHANGELOG.md, especially "Upgrading from 1.x",
   "Upgrading from 2.0" and "Upgrading from 2.1".
2. Copy over the new folders (leads, network, invoices, emails,
   whiteboards, charts) and new files.
3. Merge the shared files listed there into mine, keeping my changes.
   Take 2.0's provider order in crm-providers.tsx and add my own
   providers back below the ones they read from.
4. Run npm run lint, npm run typecheck and npm run build, fix what
   fails, and list anything you weren't sure about.

Review the changes before you commit, especially in providers you connected to a backend.

What people notice after the update

  • Their saved preferences, sidebar, dashboards and table views still load.
  • Leads, Network and Invoices are added to the Company section of a sidebar they reordered, next to the pages around them. Whiteboards and Emails join the main section.
  • Dashboards they already saved keep their cards. The new cards are in Add Card, and the tab menu's Reset all dashboards brings in the new Pipeline and Relationships dashboards.
  • The font stays Inter until someone picks another in Settings › Preferences or Themes.

Check it works

Click through the screens 2.0 touched, in light and dark mode:

  • Leads: drag a card on the kanban, then win a lead and open the new customer
  • Network: open a person, then the map
  • Invoices: mark one paid, then check Balances, Transactions and the contract's Invoices tab
  • Emails: connect the sample mailbox and reply to a thread
  • Whiteboards: create a board from a template
  • Dashboard: switch to the Pipeline and Relationships tabs
  • ⌘K: search for a lead, a person and an invoice