Skip to content

AB#139711: Small improvements of the draft feature - #2951

Merged
AntoineRelief merged 6 commits into
nextfrom
AB#139711
Oct 12, 2026
Merged

AntoineRelief merged 6 commits into
nextfrom
AB#139711

Conversation

@Joselgc1

@Joselgc1 Joselgc1 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

Improves the draft-record workflow.

This change:

  • Reduces the draft autosave delay to five seconds after the latest edit.
  • Displays a timestamped autosave confirmation with seconds.
  • Adds Creation Date and Last Updated columns to the draft list.
  • Adds backend pagination and sorting for both timestamp columns.
  • Loads only draft IDs and timestamps when listing drafts.
  • Loads full record data only when a draft is previewed or selected.
  • Displays a snackbar after successfully loading a draft.
  • Handles stale requests, deletion failures, and autosave race conditions.

Useful links

Type of change

  • Improvement (refactor or addition to existing functionality)

How Has This Been Tested?

  • Created and automatically saved draft records from the record creation modal.
  • Verified autosave occurs five seconds after the latest edit.
  • Verified the autosave confirmation displays the date, time, and seconds.
  • Verified Creation Date and Last Updated display seconds.
  • Verified backend pagination and sorting on both timestamp columns.
  • Verified previewing and loading drafts fetches the complete record on demand.
  • Verified the successful-load snackbar.
  • Verified draft deletion and page refresh behavior.
  • Verified submitted drafts become regular records.
  • Ran backend lint, TypeScript build, and focused resolver tests.
  • Ran frontend shared lint, unit tests, translation checks, and the azure-dev build.

Commands used:

Backend

npm run build
npm run test -- --runInBand __tests__/unit-tests/schema/query/draftRecords.query.spec.ts

Frontend

npx nx test shared --configuration=ci --runInBand
npm run check-i18n
NODE_OPTIONS="--max-old-space-size=8192" \
  npx nx run front-office:build:azure-dev --output-style=static

Screenshots

Automatic updating of new draft records:

image

Draft record selection:

image

After loading a draft record:

image

Previewing a draft record:

image

Checklist:

( * == Mandatory )

  • * I have set myself as assignee of the pull request
  • * My code follows the style guidelines of this project
  • * Linting does not generate new warnings
  • * I have performed a self-review of my own code
  • * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
  • * I have commented my code, particularly in hard-to-understand areas
  • * I have put JSDoc comment in all required places
  • * My changes generate no new warnings
  • * I have included screenshots describing my changes if relevant
  • * I have selected labels in the Pull Request, according to the changes with code brings
  • I have made corresponding changes to the documentation ( if required )
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • x ] Any dependent changes have been merged and published in downstream modules

@Joselgc1
Joselgc1 requested a review from AntoineRelief October 2, 2026 12:57
@AntoineRelief
AntoineRelief merged commit 26f47e9 into next Oct 12, 2026
1 check passed
@AntoineRelief
AntoineRelief deleted the AB#139711 branch October 12, 2026 08:45
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.

2 participants