Commit Graph

71 Commits

Author SHA1 Message Date
Paul Huliganga beede0e497 Add admin status view and asset versioning 2026-04-22 22:51:15 -04:00
Paul Huliganga 57e8c761f1 Clarify verification recipient behavior 2026-04-22 22:33:44 -04:00
Paul Huliganga 18d037905c Refresh templates after account selection 2026-04-22 22:21:54 -04:00
Paul Huliganga b6b734dbd1 Fix OAuth callback hash redirects 2026-04-22 22:14:29 -04:00
Paul Huliganga e995ac2764 Return auth callbacks to current page 2026-04-22 22:09:15 -04:00
Paul Huliganga e1ae1c91af Handle Adobe company profile strings 2026-04-22 12:18:42 -04:00
Paul Huliganga e19bd68ebd Use Adobe OAuth callback flow in web UI 2026-04-22 12:00:17 -04:00
Paul Huliganga 8f0b14bc62 Scope audit activity by session 2026-04-22 11:29:37 -04:00
Paul Huliganga 9f27b95f07 Recover migration results after refresh 2026-04-22 11:23:51 -04:00
Paul Huliganga fb54426bea Add tester activity audit log 2026-04-22 11:10:57 -04:00
Paul Huliganga aaa72be54e Show connected account names in UI 2026-04-22 10:52:55 -04:00
Paul Huliganga 0aba091d56 Add in-app quick start help 2026-04-22 09:27:52 -04:00
Paul Huliganga 7912eaf252 Show DocuSign user initials in avatar 2026-04-21 23:22:10 -04:00
Paul Huliganga 2681d7d5ba Show template load errors 2026-04-21 23:18:16 -04:00
Paul Huliganga 90113a6514 Add DocuSign account picker 2026-04-21 23:06:48 -04:00
Paul Huliganga af92aa6c47 Improve account switching controls 2026-04-21 21:48:07 -04:00
Paul Huliganga eb9ce84001 Add multi-user web auth sessions 2026-04-21 21:05:15 -04:00
Paul Huliganga b8dbad73ac Merge branch 'ui-redesign' 2026-04-21 20:31:13 -04:00
Paul Huliganga dd7a041820 docs: add Oracle VM deploy cheat sheet 2026-04-21 17:10:58 -04:00
Paul Huliganga 7258984386 docs: add Oracle VM deployment guide 2026-04-21 17:09:17 -04:00
paulh 683a64158e Merge pull request 'Enterprise UI redesign — Phases 14–22 (Docusign-branded migration console)' (#1) from ui-redesign into master
Reviewed-on: https://paje.ca/git/paulh/adobe-to-docusign-migrator/pulls/1
2026-04-21 15:30:43 -05:00
Paul Huliganga 3b27a0fd5b Update DocuSign auth docs and coverage 2026-04-21 16:26:13 -04:00
Paul Huliganga 3be3903986 Switch DocuSign auth to authorization code flow 2026-04-21 16:25:56 -04:00
Paul Huliganga 15c50f05e3 docs: update README, field-mapping, and EXECUTION-BOARD for Phase 23 and post-redesign fixes
Reflects all implementation from this session: 7 post-redesign bug fixes
(routing, polling, branding, verification role names, conditional parent 400s,
failure UX, template detail history expand), and Phase 23 structured field
issue reporting end-to-end. Test count updated to 119/119.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 15:34:06 -04:00
Paul Huliganga b2bbcac842 feat(issues): structured field-issue reporting throughout migration pipeline
Replaces flat warning strings with machine-readable FieldIssue objects
(code, field_name, message, severity) emitted during compose and surfaced
in all migration result paths via a new field_issues[] key.

Codes: CROSS_RECIPIENT_CONDITIONAL, UNSUPPORTED_OPERATOR, HIDE_ACTION,
MULTI_PREDICATE, INVALID_PARENT_TAB, FIELD_TYPE_SKIPPED, PARTIAL_FIELD_TYPE

Cross-recipient conditional detection: compose now builds a field→assignee
map and flags conditions where the trigger field belongs to a different
recipient — the main cause of the CONDITIONALTAB_HAS_INVALID_PARENT 400.

UI changes:
- Success rows with field_issues show ⚠️ icon + amber "partial" badge
- Results, History & Audit, and Template Detail history tab all show
  field issues grouped by code in collapsible sections within expanded rows

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 15:25:23 -04:00
Paul Huliganga 53eb206d89 fix(compose): strip invalid conditionalParentLabel refs before upload
DocuSign returns CONDITIONALTAB_HAS_INVALID_PARENT when a conditional tab
references a parent that doesn't exist or is a forbidden type (signature,
initial, auto-filled). Added _strip_invalid_conditionals() post-processing
pass that validates all conditionalParentLabel values against the actual
built tabs and removes any that won't pass DocuSign validation, logging a
warning for each. Also updated verify tests for the template role-fetch step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 15:09:11 -04:00
Paul Huliganga 4f9cb43ac8 feat(templates): expandable failure details in detail history tab
Rows with errors, blockers, or warnings now show a '▶ click for details'
hint and expand inline on click, matching the behaviour in History & Audit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 15:03:18 -04:00
Paul Huliganga 1c5b131f19 feat(migration): show error detail under failed rows and summary hint
Failed/blocked rows now show the error message or first blocker in small
red text below the template name. On completion, if any templates failed
a count + "select View Results for details" hint appears above the footer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 14:53:50 -04:00
Paul Huliganga 5eee7e0ab4 fix(verify): poll every 30s, timeout at 5 min, show Timed Out badge
DocuSign rate-limit guidance discourages polling more than once per 15 min
in production. For this manual quick-test flow, 30s intervals with a 5-min
ceiling is a reasonable middle ground. Production should migrate to DS Connect
(webhooks). Timed-out envelopes show an amber badge with Send Again action.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 14:51:37 -04:00
Paul Huliganga 374d1d10d0 fix(verify): look up actual template role names before sending envelope
Hardcoded "Signer" roleName caused envelopes to send without tags. Now
fetches template recipients first and assigns test recipient to every role,
falling back to "Signer" only if the template fetch fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 14:38:40 -04:00
Paul Huliganga 5cf415d38a fix(migration): stop polling when job status is 'completed'
Backend returns "completed" but pollJob only checked "done"/"complete",
causing infinite polling and oscillating UI state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 14:26:28 -04:00
Paul Huliganga e521fd8e58 fix(router): correct parseHash slice indices for detail routes
parts.slice(0,3) was returning the full path as base; should be slice(0,2)
so '#/templates/abc123' yields base='#/templates', param='abc123'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 14:21:50 -04:00
Paul Huliganga 6f684f330f fix(ui): rebrand DocuSign → Docusign throughout frontend (2024 brand)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 14:19:15 -04:00
Paul Huliganga e9f21b6c6d fix(ui): correct HTTP method for auth connect/disconnect endpoints
GET /api/auth/{adobe,docusign}/connect and /disconnect — not POST.
api.js was calling them with POST, causing 405 Method Not Allowed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 13:59:16 -04:00
Paul Huliganga 0dcf7193e0 feat(ui-phase-22): smoke test checklist, README update, execution board
118/118 backend tests passing (108 original + 7 verify + 3 templates).
UI-SMOKE-TEST.md: 11-section manual checklist covering project switcher,
auth, templates, dry run, real migration, issues view, verification,
history, and settings.
README: new Web UI section with navigation table, 7-step workflow guide,
and project/customer context explanation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:43:44 -04:00
Paul Huliganga 17e478e996 feat(ui-phase-21): settings view — verification defaults, migration defaults
Three sections: Verification (test recipient name/email, auto-void timer),
Migration Defaults (overwrite toggle, include documents toggle), Connections
(read-only auth status + account IDs from /api/auth/status). Save writes to
localStorage key 'migrator_settings'. Values pre-read by migration options
modal and verification send dialog.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:41:45 -04:00
Paul Huliganga 5bf2cc756a feat(ui-phase-20): history & audit view — filters, pagination, CSV export
Filterable by template name, status (success/error/dry_run/skipped), and
date range. Sortable by all columns. Expandable rows show blockers/warnings.
Checksum displayed as first 8 chars with full hash on hover tooltip.
Client-side CSV export. 50 records per page with prev/next pagination.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:41:05 -04:00
Paul Huliganga 11b646d3b7 feat(ui-phase-19): verification — send/status/void API + frontend polling
Backend (web/routers/verify.py): POST /send (creates envelope from template),
GET /status/{id} (polls envelope state), POST /void/{id} (voids test envelope).
Registered in app.py. 7 tests passing.

Frontend (verification.js): table of migrated templates, Send Test button opens
dialog with pre-filled name/email from settings, polling every 5s, per-row
status updates (Sent → Delivered → Verified), Void button for cleanup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:40:19 -04:00
Paul Huliganga 329edc39d2 feat(ui-phase-18): issues & warnings view with nav badge
Dedicated view surfacing all templates with blockers (migration will fail)
and warnings (migration with caveats). Each blocker item shows all error
messages; each warning item has a Migrate Anyway button and View Detail link.
Nav badge count driven by state.issueCount (updated when templates load).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:38:33 -04:00
Paul Huliganga 587104d520 feat(ui-phase-17): migration workflow — options modal, progress polling, results view
Options modal: dry_run, overwrite_if_exists, include_documents toggles, target
folder input. Launches POST /api/migrate/batch and polls GET /api/migrate/batch/{id}
every 2s with per-template status icons. Results view: 5-stat summary grid,
expandable per-template result rows, CSV export, Verify Templates button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:38:04 -04:00
Paul Huliganga 023c3928f3 feat(ui-phase-16): templates view — readiness badges, filter bar, detail tabs
Backend: add blockers[] and warnings[] to GET /api/templates/status. Calls
validate_template() on downloaded templates; returns empty lists if not
downloaded. 3 new tests (10 total, all passing).

Frontend (templates.js): filterable/sortable table with readiness badges
(Blocked/Caveats/Ready/Migrated/Needs Update), bulk-select toolbar,
per-row migrate/detail buttons, and template detail view with 3 tabs
(Overview, Issues, Migration History).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:26:49 -04:00
Paul Huliganga 85f82eaabf feat(ui-phase-15): project switcher — localStorage CRUD, first-run modal
Projects stored in localStorage (key: migrator_projects). CRUD: create,
list, setActive, delete. Switcher modal opens automatically on first run
when no projects exist. Active project name displayed in nav footer and
project button. Deleting a project requires confirmation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:24:40 -04:00
Paul Huliganga 516af313a1 feat(ui-phase-14): app shell — Docusign nav, router, state, brand tokens
Replace monolithic app.js/style.css with a modular CSS+JS architecture:

CSS: tokens.css (Docusign 2024 brand tokens), base.css (reset, typography,
buttons, badges, cards, toggles), nav.css (Inkwell sidebar, topbar, auth
chips), cards.css (readiness badges, filter bar, bulk toolbar, issue/result
rows), modals.css (modal shell, options panel, project switcher), tables.css
(sortable headers, pagination, checksum display), forms.css (inputs, setting
rows, connection info).

JS: utils.js (escHtml, formatDate, downloadCsv, uuid), state.js (global
reactive state with pub/sub), api.js (fetch wrappers for all endpoints),
router.js (hash-based SPA router), auth.js (connect/disconnect chips,
Adobe OAuth dialog, toast notifications), app.js (entry point — wires
router, auth, nav badges, project display).

index.html: full app shell with official docusign SVG logo, 7 nav links,
top bar with auth chips, router outlet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 11:24:06 -04:00
Paul Huliganga 89382537b1 docs(ui-redesign): implementation plan for Phases 14–22 + execution board update
Full UI redesign plan covering 9 phases: app shell, project/customer context,
templates view with readiness badges, migration workflow, issues view,
verification (with new verify API), history/audit, settings, and smoke test
checklist. Only backend additions are Phase 16 (blockers/warnings in status
endpoint) and Phase 19 (verify router). All other phases are frontend-only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 10:37:46 -04:00
Paul Huliganga aa5ab4b653 fix(ui-mockup): replace approximated logo with official Docusign SVG
Embedded the official Docusign full-color vector logo sourced from
Wikimedia Commons (Docusign_Full_Color.svg, viewBox 0 0 1200 241.4).
Wordmark paths changed to fill="#FFFFFF" for visibility on the Inkwell
(#130032) nav bar; Nexus icon retains brand colors (Cobalt #4C00FF,
Poppy #FF5252, white document shape). Brand name corrected to "docusign"
(capital D, lowercase s per 2024 rebrand).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 10:14:59 -04:00
Paul Huliganga 64b33357cf feat(ui-mockup): interactive migration console mockup with Docusign 2024 brand
Full multi-screen interactive HTML mockup for the Adobe Sign → Docusign
migration tool UI redesign. Built from scratch based on UX analysis of
the migration workflow.

Screens:
- Dashboard: migration progress stats, attention-required blockers,
  recent activity, overall progress bar
- Templates: paginated table (500+ scale), readiness badges
  (Ready/Caveats/Blocked/Migrated), multi-select bulk operations,
  filter tabs by status
- Template Detail: 4-tab view — Overview (recipients, DS target),
  Field Mapping (per-field Adobe→DS tab mapping with ✓/⚠/✕),
  Issues & Caveats (per-issue severity + manual fix guidance),
  Verification (post-migration test envelope results)
- Migration Results: per-template expandable result cards with
  warnings listed explicitly, blocked templates with fix guidance
- Issues & Warnings: aggregated view across all templates
- Verification: test envelope queue with configurable test recipient
- History & Audit: full migration run log with export
- Settings: platform connections, verification config (test
  recipient name/email, auto-void timer, API-only vs full envelope),
  Migration Project context

Key UX decisions documented:
- Readiness badge surfaces problem templates BEFORE migration attempt
- Workflow follows: Connect → Discover → Analyze → Execute → Verify
- Logs demoted to History; Issues promoted to primary nav
- Migration Project model for multi-customer support (project switcher
  modal with customer switcher — per-session but project-persistent)
- Unsupported features (conditional HIDE, calculated fields, JS
  validators) shown per-template with actionable fix guidance

Docusign 2024 brand applied:
- Wordmark: "docusign" all lowercase (April 2024 rebrand)
- Nexus icon: two converging lobe shapes (Mist + Cobalt) forming
  the inkwell / "shape of an agreement"
- Inkwell #130032 nav, Cobalt #4C00FF CTAs, Ecru #F8F3F0 background,
  Poppy #FF5252 errors, Mist #CBC2FF highlights
- Source: brand.docusign.com official guidelines

Also adds the original Blueprint .docx for reference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 10:02:30 -04:00
Paul Huliganga 342e8c3471 feat(phases-8-13): blueprint alignment — normalized schema, validation, migration options, retry, security, batch
Phase 8: Normalized intermediate schema (src/models/normalized_template.py, src/services/mapping_service.py)
  - Platform-agnostic NormalizedTemplate as pipeline bridge
  - PDF SHA-256 checksums computed during normalization
  - 13 tests passing

Phase 9: Validation service + report builder (src/services/validation_service.py, src/reports/report_builder.py)
  - Blockers (no recipients, no documents) halt migration
  - Warnings (no fields, unassigned roles, unsupported features) logged
  - Structured MigrationReport with per-template status
  - 20 tests passing

Phase 10: Migration options API (web/routers/migrate.py)
  - source_template_ids, dry_run, overwrite_if_exists, include_documents options
  - Backward compatible with legacy adobe_template_ids field
  - 7 tests passing

Phase 11: Retry with exponential backoff (src/utils/retry.py)
  - retry_with_backoff and async_retry_with_backoff decorators
  - 429/5xx detection via check_response_retryable
  - 14 tests passing

Phase 12: Security hardening (src/utils/log_sanitizer.py)
  - SanitizingFilter redacts tokens, JWTs, base64 PDF content from logs
  - 15 tests passing

Phase 13: Batch migration API
  - POST /api/migrate/batch — async background job with job_id
  - GET /api/migrate/batch/{job_id} — poll progress and results
  - 6 tests passing

Full suite: 108/108 tests passing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 02:19:38 -04:00
Paul Huliganga 854d112372 Add bulk send prototype — script, sample CSV, and demo guide 2026-04-20 01:49:19 -04:00
Paul Huliganga 39982008d3 Add latest migration files and validation outputs 2026-04-20 01:12:46 -04:00
Paul Huliganga c63d49e208 fix: Adobe Sign connects via .env refresh token; restore DocuSign OAuth
- GET /api/auth/adobe/connect: reads ADOBE_REFRESH_TOKEN from .env,
  refreshes the access token, stores in session — no login required
- Falls back to OAuth dialog only if no .env credentials exist
- Restores DocuSign OAuth start/callback endpoints alongside JWT connect
- 33/33 tests passing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 15:27:42 -04:00