Skip to content

Invoice Processing — Exploration v1.1#759

Draft
petervachon wants to merge 8 commits into
mainfrom
TestInvoice
Draft

Invoice Processing — Exploration v1.1#759
petervachon wants to merge 8 commits into
mainfrom
TestInvoice

Conversation

@petervachon
Copy link
Copy Markdown
Collaborator

Summary

Invoice Processing exploration v1.1. Adds the Slack + Outlook round-trip, glass-card Comms grouping, list-view assignee column, queue/state-tracking refinements, and collapses prior A/B/C variants down to the single shipped design.

Highlights

  • Slack roundtrip — standalone Socket Mode listener posts the escalation card, handles button actions, and ingests thread replies back into Comms. Replies from Comms post to Slack with the reviewer's identity via chat:write.customize.
  • Outlook attribution — "Contact supplier" emails appear in Comms as their own glass card with the Outlook brand mark, and feed the Comms count badge.
  • Queue card — shows · Contacted supplier as a secondary status alongside the exception tag.
  • List view — new Assignee column with avatar; Due today filter aligned to the today/tomorrow buckets.
  • Cleanup — variants A/B/C collapsed to the shipped design; legacy v1 template + VersionSwitcher removed; template module renamed.

Slack setup

See apps/apollo-vertex/slack/README.md for env vars, the Slack app manifest, and hardcoded identity caveats. The prototype runs standalone without the listener — only the escalation flow degrades to a toast error.

Test plan

  • Open the prototype at /invoice-review
  • List view → "Due today" filter shows the 4 due-today invoices
  • INV-84471 → Contact supplier → Send → Comms card appears with Outlook icon; queue card shows · Contacted supplier
  • (Requires listener) INV-GRN-001 → Flag → "Escalating to manager" → card posts in Slack; clicking Approve / Hold / Reject reflects in the prototype within ~2s
  • (Requires listener) Reply in the Slack thread → appears in Comms; reply from the Comms input → posts to the Slack thread as the reviewer

🤖 Generated with Claude Code

petervachon and others added 7 commits May 11, 2026 08:08
- Standalone Slack listener (Socket Mode) + JSON store driving the
  escalation card, button actions, and thread-reply ingestion
- "Contact supplier" sends via Outlook and lands in the Comms feed as
  a glass-card thread with Outlook brand attribution
- Queue card surfaces "Contacted supplier" as a secondary status
- List view: assignee column with avatar; Due today filter aligned to
  the today/tomorrow buckets
- Collapsed prototype variants A/B/C down to the single shipped design;
  removed VersionSwitcher and the legacy v1 template
- Renamed template module to InvoiceReviewTemplate

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs May 29, 2026, 07:38:00 AM
apollo-docs 🟢 Ready Preview, Logs May 29, 2026, 07:38:00 AM
apollo-landing 🟢 Ready Preview, Logs May 29, 2026, 07:38:00 AM
apollo-ui-react 🟢 Ready Preview, Logs May 29, 2026, 07:38:00 AM
apollo-vertex 🟢 Ready Preview, Logs May 29, 2026, 07:38:00 AM

@github-actions github-actions Bot added app:apollo-vertex size:XXL 1,000+ changed lines. labels May 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1901 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1671
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

message.external_id &&
inv.messages.some((m) => m.external_id === message.external_id)
) {
state.invoices[invoiceId] = inv;
return false;
}
inv.messages.push(message);
state.invoices[invoiceId] = inv;

function resetInvoice(invoiceId) {
const state = readState();
state.invoices[invoiceId] = blankInvoice();
const LISTENER_PORT = process.env.LISTENER_PORT || "3010";

export async function POST(request: NextRequest) {
let body = "{}";
const LISTENER_PORT = process.env.LISTENER_PORT || "3010";

export async function POST(request: NextRequest) {
let body = "{}";
} = require("./escalation-card");
const store = require("./store");

const log = (...args) => console.log("[SLACK]", ...args);
const LISTENER_PORT = process.env.LISTENER_PORT || "3010";

export async function POST(request: NextRequest) {
let body = "{}";
const LISTENER_PORT = process.env.LISTENER_PORT || "3010";

export async function POST(request: NextRequest) {
let body = "{}";
The Invoice Review template, its demo API routes, and the Slack listener
are exploration code intended to be rewritten when wired to the backend.
Linting them as production code surfaces ~80 errors that won't survive
the migration, so the directories are excluded at the config level
(single point of removal once code graduates).

Adds a README in templates/invoice-review/ describing the prototype
status and the migration path out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:apollo-vertex size:XXL 1,000+ changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants