Skip to content

Plan the staged migration from React to Streamlit (follow-up to #154) #212

Open

Description

@amar-python

Plan the staged migration from the React frontend to Streamlit

Follow-up to #154, outcome 1 ("Streamlit was fine, I prefer this"). The spike is in spikes/streamlit_review/ (README has the findings). The React code in csv-table-hub-main/ stays live until the plan below says otherwise.

Deliverable

A short written plan (a DECISIONS/ note or a comment here), not the migration itself. Implementation issues are filed from it.

Screens to cover

Today's React app has four routes: sign-in (auth.tsx), upload, preview and file list (_authenticated/index.tsx), review (review.$uploadId.tsx), and audit (audit.tsx). The spike covers review only.

Questions the plan has to answer

  1. Order. Which screen goes second? Review is done as a spike, so the rest need ordering by risk and by how much React code each lets us delete.
  2. Cutover. Run both side by side per screen, or switch the whole app at once? What is the rollback?
  3. Auth and sessions. The spike signs in with the existing /api/auth/login and keeps the token in st.session_state. Does OIDC sign-in (M2d: OIDC sign-in against a deployment-controlled IdP (BR-36) #95) work in Streamlit, and what handles session expiry?
  4. Offline install (2026-11-15: ship air-gapped install procedure or keep interim wording #60, due 15 Nov). Streamlit needs packaging for the air-gapped bundle: wheels, no usage telemetry (browser.gatherUsageStats = false), and port/WebSocket handling. The spike did not test this. Do 2026-11-15: ship air-gapped install procedure or keep interim wording #60's dry run first, or alongside?
  5. Deployment. A Streamlit process next to the API: how is it started, supervised and fronted, in the Azure and on-prem targets (docs/AZURE_DEPLOY.md, docs/PROD_DEPLOY.md)?
  6. Upload and preview screen. The mapping UI and large-file upload are the least spiked parts. Do they need their own spike before committing?
  7. Strains from the spike that need a decision: no click-to-edit on a cell, Save enabling only on Enter or blur, no per-cell tooltips, full-script reruns, limited styling.
  8. Tests. vitest covers the React screens (147 tests). What replaces it: Streamlit's AppTest, Playwright, or both?
  9. Parked issues. RV-F1 (BR-36): browser localStorage history leaks across tenants — pending #154 frontend decision #176 and F4 (Low): frontend lint 537 errors (532 auto-fixable), not in CI — pending #154 #179 go away with the React code. RV-F7: confirmed header mappings silently ignored (API model has no headerMapping field) #186, RV-F10 (BR-25): failed uploads unreachable through normal browser review flow #187 and RV-F11: Cancel does not interrupt an in-progress import (UI misleads) #188 need their UI half decided in this plan. RV-F10 (BR-25): failed uploads unreachable through normal browser review flow #187 and RV-F11: Cancel does not interrupt an in-progress import (UI misleads) #188 should say which screen they land on.

Done when

Related

#154 (spike, closing), #152, #69, #60 (offline install), #95 (OIDC), #110 (M6 staged import), #176, #179, #186, #187, #188.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions