Skip to content

5758 - Navigation: Data errors#5776

Draft
yaguzmang wants to merge 67 commits into
developmentfrom
5758-navigation-data-errors
Draft

5758 - Navigation: Data errors#5776
yaguzmang wants to merge 67 commits into
developmentfrom
5758-navigation-data-errors

Conversation

@yaguzmang
Copy link
Copy Markdown
Contributor

@yaguzmang yaguzmang commented Mar 17, 2026

Table validations

  • Server-side table node validation

    • Validate table nodes per assessment/cycle/country and cache results in Redis
    • Revalidate edited nodes together with calculated dependents
    • Emit table validation updates to the frontend after node/dependency updates
  • Frontend table validation flow

    • Fetch table validations when initializing table data
    • Remove client-side table validation
    • Remove frontend fetching of validation dependency table data
    • Show table validation errors in cells
  • Validation summary and submission warning

    • Build validation summary for sections/subsections/tables
    • Show validation error indicators in the nav
    • Warn users before submitting to review
  • Test table validations

    • Test cross-cycle validation when editing forest area
    • Test clearing validation errors after fixing data
    • Test updating dependent table validation errors after editing source data
    • Test showing validation errors on initial load
    • Test hiding validation UI on the print route
    • Test revalidating dependent max-area nodes after editing source data

Description validations

  • Validate description text

    • Queue link validation after a user edits description text with links
    • Process edited description links in the verify-links worker
    • Store visited description links and locations in the links table
    • Update Redis description-link validations after single-description validation
    • Update Redis description-link validations after full-country/full-assessment link checks
    • Emit description text validation update events
    • Listen for description text validation events in the frontend
    • Rebuild the validation summary in the client when description text validations change
    • Include description text errors in validation summary
    • Show description text link validation errors in the description UI
  • Validate data sources

    • Required fields

      • Validate data source fields that are required
      • Store fields validation results in Redis
      • Return/update required-field validation results in the frontend after save
      • Include data source errors in validation summary (backend and frontend)
      • Replace client side errors with server-side validation results
      • Show field validation errors in the nav indicators
      • Include field errors in the submit-to-review warning
    • Reference links

      • Queue reference-link validation after a user saves data sources with reference links
      • Validate reference links through the async links worker
      • Store visited reference links and locations in the links table
      • Clear stale reference-link locations/errors when a reference link is removed
      • Store reference-link validation results in Redis after link validation completes
      • Update Redis reference-link validations after single-description/data-source validation
      • Update Redis reference-link validations after full-country/full-assessment link checks
      • Emit reference-link validation update events
      • Fetch data source validations when initializing section descriptions
      • Listen for reference-link validation events in the frontend
      • Rebuild the validation summary when reference-link validations change
      • Show reference-link validation errors in the data sources UI
  • Trigger links validation after approving/disapproving a link that is in a description

  • In validateAll, validate also descriptions

  • To see if we do:

    • Split validation reducer
    • In the links worker, use section name + description name instead of description ids
  • Test description validations

    • Add tests for description text link validation flow
    • Add tests for data source validation flow

ODP validations

* 5758 - Validations type & api definitions

* 5758 - Fix api order

* 5758 - Rename files

* 5758 - Rename to summary.ts

* 5758 - Rename to table.ts
@yaguzmang yaguzmang linked an issue Mar 17, 2026 that may be closed by this pull request
8 tasks
yaguzmang and others added 28 commits March 17, 2026 07:17
* 5758 - Mirror updateDependencies Context

* 5758 - Remove collect

* 5758 - Remove context result
* 5758 - Add validateNodeUpdates

* 5758 - Update cache once

* 5758 - Add missing Objects.isEmpty

* 5758 - Fix build

* 5758 - Remove redis calls from validation function

* 5758 - Remove async

* 5758 - Add promise.all & add types

* 5758 - Remove empty checks

* 5758 - Remove incosistent cache check

* 5758 - Update touchedTableNames.add placement based on new conditions

* 5758 - Fail on missing row/col target

* 5758 - Store empty object for valid tables
* 5758 - Update validations

* 5758 - Update validations for nodes without calculation dependants

* 5758 - Update function structure
* 5758 - Implement partial summary

* 5758 - Add redis getSummary

* 5758 - Add redis setSummary

* 5758 - Remove summary cache changes

* 5758 - Add getSummary

* 5758 - Fix export names

* 5758 - Use section redis

* 5758 - Iterate over sections
* 5758 - getSummary redux

* 5758 - Remove table event
…update (#5827)

* 5758 - Update summary on table validations update

* 5758 - Subscribe only editors

* 5758 - Rename reducer to updateSummaryReducer

* 5758 - Rename event to getTableValidationsUpdateEvent

* 5758 - Remove validations on return

* 5758 - Rename file

* 5758 - Combine hooks

* 5758 - Fix tests
… - 1 (#5833)

* 5758 - Remove t Function param

* 5758 - Add validatorName param to messages

* 5758 - Remove getValidationMessage util

* 5758 - Remove unused labels from calculateCategoriesSum

* 5758 - Add ValidatorName enum
… - 2 (#5837)

* 5758 - Translate validation messages

* 5758 - Add MessageParser
* 5758 - Support row validation

* 5758 - Remove cross assessment support from data context

* 5758 - Undo changes to ContextFactory

* 5758 - Add new ValidationDependencyCache type

* 5758 - Fix build

* 5758 - Remove ValidationTargetCache

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 5758 - Add useSummaryHasErrors

* 5758 - Add validation warning

* 5758 - Reduce icon size

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
)

* 5758 - Remove external node validations

* 5758 - Remove external node validations from context

* 5758 - Fix tests
…5852)

* 5758 - Show ValidationErrorIndicator

* 5758 - Add inline-flex to Flex

* 5758 - Fix RTL

* 5758 - Remove inline-flex

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 5758 - Build validation dependants by source cell

* 5758 - Context - get dependant with colName

* 5758 - Update metacache getters

* 5758 - Refactor Member

Co-authored-by: Alejandro Guzman <alejandroguzman.dev@gmail.com>

* 5758 - Refactor Member (restore variable)

Co-authored-by: Alejandro Guzman <alejandroguzman.dev@gmail.com>

* 5758 - Fix deepscan

Co-authored-by: Alejandro Guzman <alejandroguzman.dev@gmail.com>

---------

Co-authored-by: Mino Togna <mino.togna@gmail.com>
* 5758 - Fix validateFns precedence

* 5758 - Prevent adding dependant from other assessment/cycles
* 5758 - use shouldSkipValidationFormula in evaluateTableValidations

* 5758 - Add computeTableValidations

* 5758 - Add initial backfillTableValidations

* 5758 - Remove evaluateTableValidations

* 5758 - Remove TODO

* 5758 - Remove computeValidations

* 5758 - Replace backfillTableValidations

* 5758 - Fix deepscan

* 5758 - Centralize context building and cache setting

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 5758 - Add validateAll tool

* 5758 - Add migration step

* 5758 - Only use generateMetaCache
* 5758 - Add getTableValidations

* 5758 - Fetch init table validations

* 5758 - Add useGetTableValidations

* 5758 - Remove return after dispatch

* 5758 - Revert changes to useGetTableData

* 5758 - Remove change to useGetTableData

* 5758 - Use tableSections instead of dependencies

* 5758 - Finish clean up
* 5758 - Add E2E tests for validations

* 5758 - Change target country

* 5758 - Add missing param

* 5758 - Fix tableNames param

* 5758 - Improve cell locator & fill cell

* 5758 - Unlock editing

* 5758 - Add prev cycle validation test

* 5758 - Split tests

* 5758 - Change atlantis country

* 5758 - Add numbers to folder files
yaguzmang added 30 commits May 11, 2026 15:31
* 5758 - Call validate descriptions job

* 5758 - Simplify types
* 5758 - Emit socket event on description links validation

* 5758 - Send result of validations in emitter
* 5758 - Descriptions Redis set/get

* 5758 - Update set and get

* 5758 - Set descriptions validations from worker

* 5758 - Simplify getDescriptionValidations

* 5758 - Use Objects.isEmpty
…untry links job run (#5923)

* 5758 - Add description redis update after full links job run

* 5758 - Add DescriptionValidationRedisRepository

* 5758 - Add validation repository folders
…try links job run (#5924)

* 5758 - Emit description validation event after job

* 5758 - Add useDescriptionValidations & split useValidations

* 5758 - Rename hooks

* 5758 - Return all cache in event
* 5758 - Rename event to getDescriptionValidationsUpdateEvent

* 5758 - Descriptions redux

* 5758 - Remove countryIso and add comments to event handler
* 5758 - Include descriptions in summary get

* 5758 - Update client summary on descriptions validation update

* 5758 - Divide updateSummaryReducer into methods

* 5758 - Remove empty vars

* 5758 - Update descriptions summary type
…#5961)

* 5758 - Remove early return for descriptions with no links

* 5758 - Simplify description worker and handle deleting a link

* 5758 - Preserve approvals when links are added back
…alidations endpoint (#5962)

* 5758 - Add get descriptions endpoint

* 5758 - Rename descriptionData

* 5758 - Move controller function definitions to their domain
…tions - 1 (#5963)

* 5758 - Split validation selectors

* 5758 - Move table hooks to their own file
…5970)

* 5758 - Load description validations

* 5758 - Display errors in tooltip
* 5758 - Include data sources in summary calculations

* 5758 - Rename applySectionUpdate to mergeValidations

* 5758 - Split files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigation: Data errors

1 participant