- LlamaParse service now returns a ParseResult dataclass with markdown,
total page count, and a list of failed pages (page number + error)
- Knowledge base service sets status to "partial" (instead of "parsed")
when some pages failed, with a descriptive error listing which pages
failed and why
- Frontend StatusBadge shows "partial parse" in orange for partial status
- Error details are shown inline below the document row for both partial
and error statuses
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Handle MarkdownPageFailedMarkdownPage objects gracefully by checking for
the markdown attribute with hasattr instead of assuming all pages have
it. Failed pages now log their type and all attributes so the actual
LlamaParse error is visible in logs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Parse documents concurrently (up to 10 at a time via semaphore) instead
of serially. Each coroutine uses its own DB session for per-document
status updates, while a shared lock serializes job progress increments
on the main session to avoid session-sharing issues.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents accidental deletion of knowledge base source documents by
prompting the user to confirm before proceeding.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All routine MSAL token verification logs now use DEBUG level so they
don't flood the console on every polling request.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The background task runs in its own DB session but the job row hadn't been
committed yet by the request session. The background task couldn't find
the job, causing FK violations when trying to create spec_versions.
Fix: explicitly commit the request session after creating the job and
before adding the background task, ensuring the job row is visible.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the poll request fails (e.g. job not found 404), clear the activeJob
state and stop the interval instead of endlessly retrying. Also refresh
the KB detail to get the current state.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Frontend: only treat parsing_documents/distilling as actively running;
pending jobs older than 2 minutes are ignored as stale
- Backend: add fail_stale_jobs() that marks pending/active jobs older than
5 minutes as failed before checking for active jobs in trigger_processing
- Prevents UI from getting stuck on old jobs that never completed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create DB record first to get the auto-generated UUID, then use that ID
for the storage key. Previously a separate UUID was generated for storage
but the DB record got a different one, causing file retrieval to fail
during processing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove bidirectional back_populates between SpecVersion and ProcessingJob
since both sides have FKs to each other (circular), causing SQLAlchemy to
see both as MANYTOONE. ProcessingJob.spec_version is now a standalone
relationship with explicit foreign_keys. SpecVersion no longer has a
reverse relationship to ProcessingJob (not needed for any queries).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add explicit foreign_keys argument to both sides of the bidirectional
relationship to resolve the multiple FK paths (SpecVersion.processing_job_id
and ProcessingJob.spec_version_id).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace deprecated llama-cloud-services package with llama-cloud>=1.0 (API v2).
Use AsyncLlamaCloud client with tier="agentic_plus" for maximum parsing accuracy
on complex layouts, tables, and visual structure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change from plain black text (font-medium text-black-title) to blue
link styling (font-semibold text-active-blue), matching the Flags and
Errors tabs for visual consistency.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create ErrorItem record when proof analysis results in "Analysis Error" status
- Add submitter_name/submitter_agency fields to ErrorItemResponse schema
- Eager-load proof creator and agency in error items query to avoid N+1
- Populate submitter fields from proof creator in the API route
- Update frontend ErrorItemResponse type and conversion to map submitter fields
- Fix ErrorsTable proof name styling to blue link (text-active-blue) matching Flags tab
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Style Proof Name column in Auditing Flags tab as blue clickable link
- Replace browser alert() with in-app success message in flag modal that auto-closes after 2s
- Add filled prop to FlagIcon for solid red variant when flagged
- Thread flaggedItems from App → Campaigns → ProofDetailView → FeedbackReport
- Show solid red flag icon on SubReviewCard and LeadAgentSummary when agent has been flagged
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Settings > Users tab is a disconnected prototype that stores data
only in localStorage and is not used by any other part of the application.
Backend user management is handled separately via Azure AD auto-provisioning.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, proof metadata collected during upload was only used for database
persistence. Now it flows through the entire analysis pipeline so agents can
tailor their feedback to the specific channel and format being reviewed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change all proof table body cells in the CampaignDetailView (analyzing,
error, and completed states) from text-black-title to text-primary-blue
to match the campaign list table styling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update all user-visible strings across the frontend to use "proof/proofs"
terminology instead of "asset/assets". This includes button labels, headers,
tooltips, confirmation messages, and mock feedback text. Internal code
(variable names, types, HTML IDs) remains unchanged.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- TrendingUpIcon: Changed to chart-bar icon for Pass Rate
- BugIcon: Changed to x-circle icon for Failed Reviews
- LightbulbIcon: Changed to proper light-bulb icon for Key Insight
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wrap text in nested spans using display: inline-table on outer
and display: table-cell with vertical-align: middle on inner.
This is a classic centering technique that html2canvas should handle.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use height: 24px with line-height: 24px and no vertical padding.
This forces text to center vertically within the fixed height container.
Added box-sizing: border-box and vertical-align: middle for reliability.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Text was sitting too low, reducing top padding and increasing bottom
to push text upward for visual centering.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Text was sitting too high, so need 5px top / 4px bottom to push
the text downward for visual centering.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use 4px top / 5px bottom padding to compensate for Arial font metrics
where the visual center differs from mathematical center. The extra
bottom padding pushes the text up to appear visually centered.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace flexbox-based centering (inline-flex, alignItems, justifyContent)
with explicit height + line-height matching (22px) for reliable rendering
in html2canvas. Flexbox properties don't render consistently when
converting HTML to canvas.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add validation to check MAILGUN_API_URL has a valid protocol prefix
and MAILGUN_API_KEY is set before attempting to make HTTP request.
Returns False gracefully with warning log instead of crashing with
httpx.UnsupportedProtocol error.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update font config to prioritize Barclays Effra with Inter fallback
- Add "powered by OLIVER" text to sidebar branding
- Fix sidebar user profile button border radius to consistent 10px
- Update Hero "View Documentation" button to Active Blue outline style
- Remove legacy color definitions from Tailwind config
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update UploadProofModal with new design system colors
- Update LoadingCell progress bar to active-blue
- Update DeleteConfirmationModal with pill buttons and rounded corners
- Update CampaignDeleteConfirmationModal styling
- Apply consistent border radius (10px) to all modals
- Update drag & drop zone colors to use success theme
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update Tailwind config with new color tokens (primary-blue, active-blue,
electric-violet, lime, grey-100/300/700/900, success, warning, error)
- Add Inter font from Google Fonts as Barclays Effra alternative
- Update Sidebar with primary-blue background and white active state
- Update Hero with electric-violet accent and pill-shaped buttons
- Update all tables with lime (#C3FB5A) header backgrounds
- Implement alternating row colors (white/grey-100) on tables
- Update status badges: In Progress (amber), Completed (green)
- Update tabs with active-blue underline styling
- Apply 10px border radius to cards and containers
- Update button styling to pill-shaped with active-blue
- Update input/dropdown borders to grey-700 with 2px
- Update selected state highlighting to info-light (#E7F0FB)
- Update FeedbackReport RAG status colors to new design system
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When analyzing proof revisions (version > 1), SubReviewCard now displays
issues in three distinct categories: Resolved Issues (green, collapsed by
default), Outstanding Issues (amber), and New Issues (red). Each section
is collapsible with count badges. Original mode (version 1) maintains
backward compatibility with the single "Actionable Issues" list.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add file_hash and is_identical_file columns to proof_versions table
- Compute MD5 hash on file upload and compare with previous version
- Display warning banner when uploading identical file as revision
- Return is_identical_file in WebSocket response and API endpoints
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When a subsequent revision of a proof is uploaded, the analysis now takes
place in context of the previous version's results. The system identifies:
- Resolved issues: fixed in the new revision
- Outstanding issues: still present from previous version
- New issues: introduced in the new revision
Key changes:
- Add resolvedIssues, outstandingIssues, newIssues fields to SubReview
- Add PreviousReviewContext model for passing previous review data
- Update all specialist agents to accept previous_review context
- Extend GeminiService with include_revision_fields parameter
- Add get_latest_version_review() repository method
- Update LeadAgent to synthesize cross-version context in summary
- Fetch previous analysis in WebSocket handler for revisions
First version analysis continues to work exactly as before with revision
fields set to null.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Run all 4 specialist agents (Legal, Brand, Channel Best Practices,
Channel Tech Specs) concurrently instead of sequentially. This reduces
total analysis time to roughly the duration of the slowest agent rather
than the sum of all agent times.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed the AI model used for proof analysis from gemini-2.5-flash
to gemini-3-pro-preview for improved analysis capabilities.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move /files/{storage_key}/pages endpoint before the base /files/{storage_key}
endpoint so FastAPI matches the more specific route first.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Backend: Generate PDF thumbnail from first rasterized page on upload
- Backend: Add /files/{storage_key}/pages endpoint for PDF rasterization
- Frontend: Add getPdfPages() method to apiService
- Frontend: Create usePdfPages hook for on-demand PDF page loading
- Frontend: Pass pdfPages prop to ProofPreview in Campaigns view
This fixes the issue where PDF uploads showed no visual preview in results.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>