Status: Current navigation map
Created: 2026-04-23
Updated: 2026-05-17
Purpose: Help contributors locate code by workflow before reading the whole repository.
For the full documentation entry point, see Documentation.
Detailed module pages:
- Architecture
- Backend API
- Backend Data Layer
- Frontend State
- Frontend Layout
- Frontend Viewer
- Subsidence Panel
- Project Format
- Testing
- Logging
The application has two main runtimes:
- Backend: FastAPI application in
app/src/subsidence. - Frontend: Vite + React + Zustand application in
frontend/src.
The project bundle is stored on disk as a .subsidence project folder containing SQLite metadata, Parquet curve payloads, checkpoints, and generated result files.
File:
app/src/subsidence/api/main.py
Responsibilities:
- Create the FastAPI app.
- Configure CORS.
- Attach
ProjectManagertoapp.state. - Register routers.
Typical changes:
- Add middleware.
- Register new route modules.
- Add app-wide logging/diagnostics.
Registered route families:
/api/wells.../api/wells/{well_id}/formations.../api/strat-units/api/strat-charts.../api/compaction-models.../api/subsidence.../api/ws/recalculate/api/projects...
Files:
app/src/subsidence/api/projects.py— lifecycle, path helpers, shared modelsapp/src/subsidence/api/projects_imports.py— import endpoints (LAS, logs CSV, tops, unconformities, deviation)app/src/subsidence/api/projects_config.py— undo/redo, checkpoints, dictionaries, visual configapp/src/subsidence/api/export.py- export endpoints for well info, logs, tops, deviation, StratCharts, and sea-level curves.
The project routers share the /api/projects prefix and are registered in main.py. Public API paths are unchanged.
projects.py also owns all Pydantic models and helpers used across the split files.
Risk:
- Native path picking endpoints in
projects.pyruntkinterin a short subprocess. Do not reintroduce module-scopetkinterimports or create Tk roots in the FastAPI worker process. - Shared models are imported by the split files; renaming models in
projects.pyrequires updating those imports.
File:
app/src/subsidence/api/wells.py
Responsibilities:
- List wells and well inventory.
- Load a well with curves/formations/deviation summary.
- Load curve LOD data.
- Patch well metadata.
- Load deviation survey.
Main endpoint groups:
GET /api/wellsGET /api/wells/inventoryGET /api/wells/{well_id}GET /api/wells/{well_id}/curvesGET /api/wells/{well_id}/curves/fullPATCH /api/wells/{well_id}GET /api/wells/{well_id}/deviation
Risk:
- Inventory payload, curve payload loading, formation link mapping, and well metadata live together.
Refactor direction:
- Extract response builders for inventory, well detail, curves, and deviation.
Files:
app/src/subsidence/api/formations.pyapp/src/subsidence/api/strat_chart.py
Responsibilities:
- Formation CRUD and link/type/age behavior.
- Strat chart load/list/delete/current behavior.
- Strat unit dictionary access.
Main endpoint groups:
GET /api/strat-unitsGET/POST/PATCH/DELETE /api/wells/{well_id}/formations...PUT /api/wells/{well_id}/formations/{formation_id}/strat-linkGET /api/strat-chartsPATCH /api/strat-charts/{chart_id}/activateDELETE /api/strat-charts/{chart_id}POST /api/strat-charts/import
Typical bugs:
- Wrong active chart.
- Built-in chart mutability.
- Tops linked to one chart but displayed against another.
Files:
app/src/subsidence/api/subsidence.pyapp/src/subsidence/api/compaction.py
Responsibilities:
- WebSocket recalculation.
- Compaction/lithology model behavior.
- Backstrip calculation orchestration.
Main endpoint groups:
GET /api/subsidence/stored-resultsPOST /api/wells/{well_id}/subsidenceWebSocket /api/ws/recalculateGET/POST/PATCH/DELETE /api/compaction-models...GET/PATCH /api/compaction-models/{model_id}/params...
Typical bugs:
- Recalculation not triggered.
- Stale formations after edit.
- Missing or wrong water depth input.
File:
app/src/subsidence/api/import_preview.py
Responsibilities:
- LAS and tabular (CSV/TSV) file preview before committing an import.
- Returns column names, sample rows, detected delimiter, total row count, and warnings.
- Delegates to
data/importers/preview.py.
Main endpoint groups:
POST /api/import-preview/tabularPOST /api/import-preview/las
File:
app/src/subsidence/api/lithology_patterns.py
Responsibilities:
- Palette CRUD and built-in seed seeding.
- User SVG upload with validation and sanitization.
- Pattern-to-palette assignment and ordering.
Main endpoint groups:
GET/POST/DELETE /api/lithology-patterns/palettes...POST /api/lithology-patterns/palettes/{id}/patternsGET /api/lithology-patterns/patterns/{code}/svg
Risk:
- SVG sanitization must run before storing user-uploaded content.
File:
app/src/subsidence/api/sea_level.py
Responsibilities:
- Sea level curve CRUD (named curves with point arrays).
- Per-well active sea level curve assignment.
Main endpoint groups:
GET/POST/DELETE /api/sea-level/curves...GET/PUT /api/wells/{well_id}/sea-level
File:
app/src/subsidence/api/top_sets.py
Responsibilities:
- Top set and horizon CRUD.
- Per-well active top set assignment.
- TVD recalculation triggers via
deviation_transform.py. - Zone aggregation via
zone_service.py.
Main endpoint groups:
GET/POST/PATCH/DELETE /api/top-sets...GET/POST/PATCH/DELETE /api/top-sets/{id}/horizons...GET/PUT /api/wells/{well_id}/active-top-set
File:
app/src/subsidence/data/project_manager.py
Responsibilities:
- Open project state.
- Project directory and manifest handling.
- SQLite engine/session lifecycle.
- Recent projects.
- Save/checkpoint plumbing.
Risk:
- This is the stateful center of the backend. Bugs here affect almost every workflow.
Do not refactor before tests:
- create/open/save/close project
- recent projects
- checkpoint create/restore/delete
- project lock/session lifecycle
File:
app/src/subsidence/data/engine.py
Responsibilities:
- SQLite engine creation.
- SQLite pragmas.
- Table creation.
- Lightweight schema migrations.
- Project DB validation.
Typical bugs:
- Old projects fail to open after schema changes.
- SQLite foreign keys or journal mode behave differently on another machine.
- Migration silently misses a new persisted field.
Files:
app/src/subsidence/data/schema.pyapp/src/subsidence/data/models.py
Responsibilities:
- SQLAlchemy tables.
- Pydantic/domain response models.
Typical changes:
- New persisted fields.
- Project format changes.
Rule:
- Schema changes need migration or compatibility notes.
Files:
app/src/subsidence/data/importers/__init__.py— re-exports all public symbolsapp/src/subsidence/data/importers/common.py— shared helpers, well resolution, payload writingapp/src/subsidence/data/importers/las.py— LAS importapp/src/subsidence/data/importers/logs_csv.py— logs CSV importapp/src/subsidence/data/importers/tops.py— tops and unconformities importapp/src/subsidence/data/importers/deviation.py— deviation importapp/src/subsidence/data/importers/wells.py— wells CSV importapp/src/subsidence/data/importers/log_resampling.py— shared log resamplingapp/src/subsidence/data/loaders.py— read curve and deviation payloads from Parquet
Public function signatures are unchanged. All callers import from data.importers (the package).
Risk:
- This is the most important backend correctness hotspot. Behavior bugs here affect all import workflows.
File:
app/src/subsidence/data/undo.py
Responsibilities:
- Undo/redo command records.
- Reversible operations.
Typical bugs:
- Operation modifies data but does not record undo.
- Undo restores metadata but not linked payload files.
Files:
app/src/subsidence/data/dict_seeder.pyapp/src/subsidence/data/dict_resolver.pyapp/src/subsidence/data/strat_link.pyapp/src/subsidence/data/unit_conversion.pyapp/src/subsidence/data/dictionaries/curve_families.csvapp/src/subsidence/data/dictionaries/lithology_defaults.csv
Responsibilities:
- Built-in curve/lithology/stratigraphy defaults.
- Resolve curve mnemonics.
- Link tops to strat chart units.
- Normalize units.
Dictionary CSV ownership:
curve_families.csv: backend default mnemonic/family/range behavior.lithology_defaults.csv: compaction/lithology default parameters.frontend/src/utils/curvePresets.ts: frontend visual defaults for curve display.
Keep backend dictionary behavior and frontend visual presets intentionally aligned.
Files:
app/src/subsidence/data/lttb.pyapp/src/subsidence/data/backstrip.py
Responsibilities:
lttb.py: downsample dense curve arrays for visible windows.backstrip.py: 1D backstrip/decompaction calculation.
Rule:
- Calculation changes need backend unit tests.
- LOD changes need frontend rendering/performance checks and API tests around
/api/wells/{well_id}/curves.
File:
app/src/subsidence/data/zone_service.py
Responsibilities:
- Aggregate zone lithology fractions from discrete curve data.
- Build and rebuild
FormationZonerecords for a top set. - Merge zones when a horizon is deleted.
- Ensure per-well zone data exists before recalculation.
File:
app/src/subsidence/data/unit_registry.py
Responsibilities:
- Load and query
MeasurementUnitandMeasurementUnitAliasrecords from SQLite. - Normalize unit strings (strip whitespace, superscripts, Greek chars) before lookup.
File:
app/src/subsidence/data/deviation_transform.py
Responsibilities:
- Convert MD formation picks to TVD using a well's deviation survey.
- Min-curvature method; supports INCL_AZIM survey mode.
- Called from
top_sets.pywhen a survey is updated.
File:
app/src/subsidence/data/lithology_patterns.py
Responsibilities:
- SVG content sanitization and validation before storage.
- Pattern code normalization.
- Runtime support for the built-in equinor seed and user-uploaded patterns.
See docs/lithology-pattern-palettes.md for seed source details.
File:
app/src/subsidence/data/importers/preview.pyapp/src/subsidence/data/importers/log_resampling.py
Responsibilities:
- Parse LAS and tabular files without committing data.
- Return column list, sample rows, detected delimiter, and warnings for the Import Wizard UI.
- Resample imported log curves onto the per-well MD reference grid.
File:
frontend/src/App.tsx
Responsibilities:
- Compose toolbar, data manager, viewer, settings, status bar.
- Coordinate high-level effects after project/well changes.
- Wire keyboard shortcuts and top-level dialogs.
- Coordinate active well hydration and stored subsidence result loading.
Risk:
- High-level side effects should stay small. Detailed logic belongs in stores or hooks.
Files:
frontend/src/stores/projectStore.tsfrontend/src/stores/wellDataStore.tsfrontend/src/stores/workspaceStore.tsfrontend/src/stores/viewStore.tsfrontend/src/stores/multiWellStore.tsfrontend/src/stores/computedStore.ts
Responsibilities:
projectStore.ts: project lifecycle, recent projects, visual config hydration/persistence.wellDataStore.ts: active well data, curves, formations, inventories, well metadata patches.workspaceStore.ts: per-well viewer templates, tracks, visible curves, layout state.viewStore.ts: viewer selection, zoom, scroll, scale, active panel state.multiWellStore.ts: multi-well/subsidence panel state.computedStore.ts: calculated subsidence data, websocket state, display toggles.
Important store helpers:
workspaceStore.buildTrackOrder: canonical track ordering with depth/formations/static tracks.workspaceStore.coerceWellViewState: visual config hydration guard.projectStore.collectProjectVisualConfig: project-level visual config serialization.projectStore.collectWellVisualConfigs: per-well visual config serialization.wellDataStore.updateFormationDepth: optimistic/debounced top depth patching.computedStore.triggerRecalculation: WebSocket recalculation entry point.
Risk:
- Stores are convenient but can become hidden coupling points. Any new state should have a clear owner.
Files:
frontend/src/components/layout/DataManagerPane.tsxfrontend/src/components/layout/DataManagerTopPane.tsxfrontend/src/components/layout/WellDataPanel.tsxfrontend/src/components/layout/StratChartTab.tsxfrontend/src/components/layout/CompactionModelsTab.tsxfrontend/src/components/layout/useDataManagerController.ts— thin coordinator hookfrontend/src/components/layout/dataManagerSelection.ts— object selection handlersfrontend/src/components/layout/dataManagerVisibility.ts— toggle/visibility handlersfrontend/src/components/layout/dataManagerActions.ts— context menu action handlersfrontend/src/components/layout/pathMemory.ts
Responsibilities:
- Tree display for strat charts, wells, and models.
- Selection, expansion, checkboxes/radio controls.
- Context menus.
- Object actions: duplicate, delete, rename, link, add/remove visualization items.
- Last project/import root memory.
useDataManagerController.ts calls makeSelectionHandlers, makeVisibilityHandlers, and makeActionHandlers each render and returns a unified public shape.
Risk:
WellDataPanel.tsxrenders both tree structure and visibility controls. UI bugs can be state bugs or rendering bugs.
Files:
frontend/src/components/layout/SettingsInspector.tsx— dispatcher by selected object typefrontend/src/components/layout/SettingsPaneShell.tsx
Well viewer settings:
frontend/src/components/layout/settings/WellSettings.tsxfrontend/src/components/layout/settings/DepthTrackSettings.tsxfrontend/src/components/layout/settings/FormationsTrackSettings.tsxfrontend/src/components/layout/settings/LasSettings.tsxfrontend/src/components/layout/settings/CurveSettings.tsxfrontend/src/components/layout/settings/TopsSettings.tsxfrontend/src/components/layout/settings/TopPickSettings.tsxfrontend/src/components/layout/settings/StratChartSettings.tsxfrontend/src/components/layout/settings/ModelSettings.tsx
Dictionary and template settings:
frontend/src/components/layout/settings/CurveMnemonicSetsRootSettings.tsxfrontend/src/components/layout/settings/CurveMnemonicSetSettings.tsxfrontend/src/components/layout/settings/LithologyDictionarySettings.tsxfrontend/src/components/layout/settings/LithologySetsRootSettings.tsxfrontend/src/components/layout/settings/LithologySetSettings.tsxfrontend/src/components/layout/settings/LithologyPatternPalettesRootSettings.tsxfrontend/src/components/layout/settings/LithologyPatternPaletteSettings.tsxfrontend/src/components/layout/settings/LithologyPatternPreview.tsxfrontend/src/components/layout/settings/CompactionPresetsRootSettings.tsxfrontend/src/components/layout/settings/CompactionPresetSettings.tsxfrontend/src/components/layout/settings/CompactionPresetDraftSettings.tsxfrontend/src/components/layout/settings/MeasurementUnitsRootSettings.tsxfrontend/src/components/layout/settings/UnitDimensionSettings.tsx
Zone settings:
frontend/src/components/layout/settings/ZoneSettings.tsxfrontend/src/components/layout/settings/ZoneDetailSettings.tsx
Responsibilities:
- Show editor for the selected object.
SettingsInspector.tsxdispatches to the matching settings component based onselectedObject.type.
Files:
frontend/src/components/layout/ProjectToolbar.tsxfrontend/src/components/layout/NewProjectDialog.tsxfrontend/src/components/layout/CreateWellDialog.tsxfrontend/src/components/layout/ImportLasDialog.tsxfrontend/src/components/layout/ImportTopsDialog.tsxfrontend/src/components/layout/ImportWellsDialog.tsxfrontend/src/components/layout/ImportDeviationDialog.tsxfrontend/src/components/layout/LoadStratChartDialog.tsxfrontend/src/components/layout/LoadSeaLevelCurveDialog.tsxfrontend/src/components/layout/LinkStratChartDialog.tsxfrontend/src/components/layout/ExportWellInfoDialog.tsxfrontend/src/components/layout/ExportWellLogsDialog.tsxfrontend/src/components/layout/ExportWellTopsDialog.tsxfrontend/src/components/layout/ExportWellDeviationDialog.tsxfrontend/src/components/layout/ExportStratChartDialog.tsxfrontend/src/components/layout/ExportSeaLevelCurveDialog.tsxfrontend/src/components/layout/FileOpenDialog.tsx
Responsibilities:
- User actions and path selection.
- Import target selection.
- Project menu and action groups.
- Windows/native path picking through backend picker endpoints.
Typical bugs:
- Wrong active well preselected.
- File/folder picker does not remember root.
- Dialog writes to path field but action uses stale value.
- Active well target not used when source data has no well name.
Files:
frontend/src/components/layout/importWizard/ImportWizardShell.tsx— multi-step shell, step routingfrontend/src/components/layout/importWizard/LasPreviewPane.tsx— LAS file preview stepfrontend/src/components/layout/importWizard/TabularPreviewPane.tsx— CSV/TSV preview stepfrontend/src/components/layout/importWizard/ImportWizardFileField.tsx— file selection stepfrontend/src/components/layout/importWizard/ImportWizardTargetWellSelect.tsx— shared target well selectorfrontend/src/components/layout/importWizard/importWizardPresets.ts— built-in column mapping presetsfrontend/src/components/layout/importWizard/importWizardUtils.ts— shared parsing helpersfrontend/src/components/layout/importWizard/mapping.ts— column mapping logicfrontend/src/components/layout/importWizard/types.ts— wizard state typesfrontend/src/components/layout/importWizard/useImportPreview.ts— hook calling preview APIfrontend/src/components/layout/importWizard/index.ts— re-exports
Responsibilities:
- Show a file before committing an import.
- Let the user map source columns to target fields.
- Apply presets for known formats (LAS standard, common tops CSV shapes).
- Current shared controls also include file selection, target well selection, depth unit/reference, null value, and tabular mapping behavior. Check
ImportWizardFileField.tsxandImportWizardTargetWellSelect.tsxbefore changing individual import dialogs.
Files:
frontend/src/components/layout/SplitView.tsx— resizable left/right split containerfrontend/src/components/layout/StatusBar.tsx— bottom status barfrontend/src/components/layout/TemplatesTab.tsx— Templates tab in Data Managerfrontend/src/components/layout/ViewerWorkspace.tsx— log viewer + subsidence panel workspace shellfrontend/src/components/layout/ZoomControl.tsx— depth zoom stepper control
Files:
frontend/src/components/logview/LogViewPanel.tsxfrontend/src/components/logview/DataTrack.tsxfrontend/src/components/logview/DepthTrack.tsxfrontend/src/components/logview/FormationColumn.tsxfrontend/src/components/logview/TrackHeaderRow.tsxfrontend/src/components/logview/TrackHeader.tsxfrontend/src/components/logview/WellOverviewMinimap.tsxfrontend/src/components/logview/WellViewerToolbar.tsx— per-well viewer toolbar (zoom, scale, mode)frontend/src/components/logview/CurveScaleBar.tsx— per-track scale bar overlayfrontend/src/components/logview/CurveBrowser.tsx— curve browser for adding curves to tracksfrontend/src/components/interaction/InteractionOverlay.tsxfrontend/src/components/interaction/FormationTopLine.tsxfrontend/src/components/interaction/DepthCursor.tsxfrontend/src/components/interaction/CurveTooltip.tsxfrontend/src/renderers/*.tsfrontend/src/hooks/*.tsfrontend/src/utils/curvePresets.ts
Responsibilities:
- Render depth track, log tracks, curves, fills, formation column, tops, and interaction overlays.
- Keep canvas rendering separated from SVG/HTML interaction.
- Apply curve mnemonic visual defaults.
- Use the shared log-view extent for scroll, minimap, fit actions, and grey padding zones:
-100..0is top padding,wellBottomDepth..wellBottomDepth+100is bottom padding.
Rule:
- Renderer changes should be tested with pure unit tests where possible.
DataTrack.tsxcurrently owns clipping/interpolation helpers. If reused elsewhere, extract with tests first.
Important viewer files:
curvePresets.ts: frontend mnemonic defaults for curve color, limits, scale, precision, line style, and fill.fillRenderer.ts: baseline and curve-to-curve fill logic.TrackResizeHandle.tsx: track width changes.TrackHeaderRow.tsx: drag/reorder and header selection surface.useSynchronizedScroll.ts: depth scroll/zoom behavior.useKeyboardShortcuts.ts: keyboard actions for zoom, scroll, undo/redo, delete/link top.
Files:
frontend/src/api/subsidenceSocket.tsfrontend/src/components/subsidence/MultiWellPanel.tsxfrontend/src/components/subsidence/SubsidencePanel.tsxfrontend/src/components/subsidence/SubsidenceCanvas.tsxfrontend/src/components/subsidence/SubsidenceControls.tsxfrontend/src/components/subsidence/SubsidenceToolbar.tsxfrontend/src/components/subsidence/GeologicalTimescale.tsxfrontend/src/utils/exportPng.tsfrontend/src/utils/stratTimescale.tsfrontend/src/utils/subsidenceChartDomain.ts
Responsibilities:
- Show burial/subsidence curves.
- Trigger and display recalculation results.
- Export panel PNG.
- Render stored multi-well results.
- Keep WebSocket connection and retry queue.
- Render geological timescale from the active StratChart.
- Apply global reconstruct/truncate cutoff settings.
Known historical risk:
- This panel has had visibility/rendering issues. Keep a dedicated bug document for panel rendering failures.
- There are two display modes in code: active-well
SubsidencePanel/SubsidenceCanvasand stored-resultsMultiWellPanel.
Files:
frontend/src/index.css—@importindex onlyfrontend/src/styles/base.css— reset rules,:root,html/bodyfrontend/src/styles/app-layout.css— app shell, topbar, status bar, sidebar, workspace layoutfrontend/src/styles/data-manager.css— sidebar panels, trees, top leaves, template panels, compaction tablefrontend/src/styles/log-view.css— depth track, data track, formation column, track headers, log view panelfrontend/src/styles/dialogs.css— project dialogfrontend/src/styles/subsidence-panel.css— split view, subsidence panel, toolbar, canvas, timescale
- Frontend calls
projectStore.openProject. - Backend
projects.pyopens the project throughProjectManager. - Frontend loads project status, visual config, well inventories, and active/first well.
wellDataStoreloads well detail and formations.workspaceStorehydrates per-well viewer state.
- User opens import dialog from toolbar.
- Frontend posts to
/api/projects/import-lasor/api/projects/import-logs-csv. - Backend route delegates to
data/importers.py. - Importer resolves target well or creates one.
- Curve metadata goes to SQLite, curve arrays go to Parquet payload files.
- Frontend refreshes inventories and the affected well.
- User imports tops CSV.
- Backend resolves target well.
- Tops are inserted as formations.
- Links/colors/ages are resolved against the active or chosen strat chart when possible.
- Frontend reloads formations/inventory.
- Frontend sends visual config and project save.
- Backend persists metadata and manifest state.
- Reopen should restore project status, wells, curves, formations, strat charts, and visual config.
Implementation files:
projectStore.collectProjectVisualConfigprojectStore.collectWellVisualConfigsprojects.pyvisual-config routesproject_manager.pysave/checkpoint methodsworkspaceStore.coerceWellViewState
- Formation edits or controls trigger frontend recalculation.
computedStorecallsapi/subsidenceSocket.ts.subsidenceSocket.tssends the WebSocket payload to/api/ws/recalculate.- Backend computes in
subsidence.pyusingdata/backstrip.py. - Frontend receives results and renders
SubsidenceCanvas.
- Data Manager toggles/selects well, LAS group, curves, tops, or tracks.
useDataManagerController.tsupdatesworkspaceStoreand/or selected object state.workspaceStoredetermines track order and visible curve configs.wellDataStoreprovides active well curve arrays and formations.LogViewPanelrendersTrackHeaderRow,DepthTrack,DataTrack,FormationColumn, andInteractionOverlay.
- Dialog uses
pathMemory.tsto suggest last root. - Frontend calls
/api/projects/pick-folderor/api/projects/pick-file. projects.pyinvokes an isolated native-picker subprocess and returns selected path.- Dialog updates local input and remembers the root.
| Bug report | Start here |
|---|---|
| Project cannot open/save/reopen | projectStore.ts, api/projects.py, data/project_manager.py |
| Recent projects wrong | projectStore.ts, data/project_manager.py, api/projects.py |
| Native file/folder picker wrong | FileOpenDialog.tsx, import dialogs, pathMemory.ts, api/projects.py |
| Backend crashes after file picking | api/projects.py native picker subprocess path; avoid in-process tkinter |
| LAS/log CSV imports into wrong well | import dialog, projectStore.ts, importers/common.py, api/projects_imports.py |
| Logs CSV delimiter problem | importers/logs_csv.py, ImportLasDialog.tsx, api/projects_imports.py |
| Tops colors/links wrong | importers/tops.py, data/strat_link.py, api/formations.py, StratChartTab.tsx |
| Data Manager tree wrong | WellDataPanel.tsx, DataManagerPane.tsx, useDataManagerController.ts |
| Data Manager context menu slow/wrong | useDataManagerController.ts, DataManagerPane.tsx, WellDataPanel.tsx |
| Settings pane wrong object | viewStore.ts, SettingsInspector.tsx, dataManagerSelection.ts |
| Well settings not saved | settings/WellSettings.tsx, wellDataStore.ts, api/wells.py |
| Track display wrong | workspaceStore.ts, LogViewPanel.tsx, TrackHeaderRow.tsx, DataTrack.tsx |
| Track order wrong after reopen | workspaceStore.ts, projectStore.ts, TrackHeaderRow.tsx, api/projects.py visual config |
| Curve rendering wrong | DataTrack.tsx, renderers/*, hooks/useCanvasRenderer.ts |
| Curve defaults wrong | utils/curvePresets.ts, data/dictionaries/curve_families.csv, api/projects.py dictionary endpoints |
| Formation drag wrong | FormationTopLine.tsx, wellDataStore.ts, api/formations.py |
| Strat chart cannot delete/load | api/strat_chart.py, StratChartTab.tsx, projectStore.ts |
| Built-in ICS chart wrong | data/dict_seeder.py, api/strat_chart.py, sample_data/ics_chart2023.csv |
| Undo/redo wrong | projectStore.ts, api/projects.py, data/undo.py |
| Subsidence panel blank/wrong | computedStore.ts, api/subsidenceSocket.ts, MultiWellPanel.tsx, SubsidenceCanvas.tsx, api/subsidence.py |
| Export wrong | api/export.py, export dialogs, components/layout/export/*, utils/exportDownload.ts |
| Exported data cannot be imported automatically | api/export.py, import dialogs, data/importers/* |
| Layout scroll/resizer bug | styles/app-layout.css, styles/subsidence-panel.css, SplitView.tsx, DataManagerPane.tsx, MultiWellPanel.tsx |
| Import Wizard wrong column mapping | importWizard/mapping.ts, importWizard/importWizardPresets.ts, TabularPreviewPane.tsx, LasPreviewPane.tsx |
| Import preview fails or wrong | api/import_preview.py, data/importers/preview.py, importWizard/useImportPreview.ts |
| Lithology pattern missing/wrong SVG | api/lithology_patterns.py, data/lithology_patterns.py, settings/LithologyPatternPaletteSettings.tsx |
| Zone lithology aggregation wrong | data/zone_service.py, api/top_sets.py, settings/ZoneDetailSettings.tsx |
| TVD picks wrong after survey import | data/deviation_transform.py, api/top_sets.py, api/projects_imports.py |
| Measurement unit lookup wrong | data/unit_registry.py, data/unit_conversion.py, settings/MeasurementUnitsRootSettings.tsx |
| StratChart timescale wrong | api/strat_chart.py, utils/stratTimescale.ts, GeologicalTimescale.tsx, StratChartSettings.tsx |
| Log resampling/null values wrong | data/importers/log_resampling.py, data/importers/las.py, data/importers/logs_csv.py, api/export.py |
These files are allowed to change, but not casually. Add tests/logging first when the change is behavioral.
| File | Why risky | Safety net needed |
|---|---|---|
app/src/subsidence/data/importers/ |
all import paths and well auto-resolution | API import/save/reopen tests |
app/src/subsidence/api/projects*.py |
project lifecycle, subprocess-isolated native dialogs; shared models imported by split files | project lifecycle + import API tests |
frontend/src/components/layout/useDataManagerController.ts |
many object actions and selection behavior | Data Manager component/store tests |
frontend/src/stores/projectStore.ts |
project lifecycle and visual config serialization | save/reopen/hydration tests |
frontend/src/stores/wellDataStore.ts |
active well data, optimistic top updates | well switching + formation CRUD tests |
frontend/src/components/subsidence/* |
two rendering paths and WebSocket-fed data | recalculation + stored-results tests |
app/src/subsidence/data/zone_service.py |
lithology aggregation depends on curve arrays and top set structure | zone rebuild + lithology aggregation tests |
app/src/subsidence/data/deviation_transform.py |
TVD conversion affects all pick depths | deviation import + TVD recalc tests |
app/src/subsidence/data/lithology_patterns.py |
SVG sanitization is a security boundary for user uploads | SVG injection + round-trip tests |
frontend/src/components/layout/importWizard/* |
mapping logic drives what gets imported; preset mismatches cause silent wrong data | preview + mapping + commit integration tests |
app/src/subsidence/api/export.py |
export must round-trip into import workflows and writes user files | export API + import round-trip tests |
frontend/src/utils/stratTimescale.ts |
shared timescale row logic for charts and cutoff dropdowns | unit tests for sparse hierarchy and visible/all modes |
Frontend:
cd frontend
npm run test -- --runBackend:
cd app
pytest testsRecent baseline from 2026-05-17:
- Frontend: 88 passed.
- Backend: 158 passed.