Skip to content

Add task presets, property clearing, and system suggestions - #282

Closed
felixevers wants to merge 38 commits into
user-doc-ukmfrom
main
Closed

Add task presets, property clearing, and system suggestions#282
felixevers wants to merge 38 commits into
user-doc-ukmfrom
main

Conversation

@felixevers

Copy link
Copy Markdown
Member

Summary

This PR introduces task presets for templating task creation, property clearing functionality for bulk data management, system suggestion modals for clinical guidelines, and significant improvements to data loading, caching, and testing infrastructure.

Key Changes

Task Presets

  • Added backend support for task presets with TaskPresetType, TaskGraphNodeType, and related GraphQL resolvers
  • Implemented task preset CRUD operations (useCreateTaskPreset, useUpdateTaskPreset, useDeleteTaskPreset, useTaskPresets)
  • Created task preset management UI at /settings/task-presets with preset editing and deletion
  • Added ApplyTaskGraph mutation to apply preset templates to patients
  • Implemented LoadTaskPresetDialog and TaskPresetDataEditor components for preset selection and configuration

Property Clearing

  • Added ClearPatientProperty and ClearTaskProperty mutations for bulk clearing of property values
  • Implemented ClearPropertyColumnDialog component with confirmation and type-in validation
  • Created hooks usePatientPropertyClearDialog and useTaskPropertyClearDialog for dialog state management
  • Added property column header menu with clear action

System Suggestions

  • Created SystemSuggestionModal component for displaying clinical guideline adherence suggestions
  • Added SystemSuggestionTasksContext for managing suggested tasks
  • Implemented LoadTaskPresetDialog integration with system suggestions
  • Added mock data support for testing suggestions

Data Loading & Caching

  • Refactored useAccumulatedPagination hook with improved pagination bounds computation and contiguous page tracking
  • Added samePaginatedListItems utility for comparing paginated list items
  • Implemented optimistic property updates with buildOptimisticProperties and applyOptimisticProperties
  • Enhanced Apollo cache policies for task presets and property mutations
  • Added mutation queue persistence for offline support

Testing Infrastructure

  • Added comprehensive E2E test support with mockBackend for deterministic GraphQL mocking
  • Created E2E tests for data loading (data-loading.spec.ts) and patient table (patient-table.spec.ts)
  • Added unit tests for pagination, view definitions, property utilities, and date utilities
  • Implemented vitest.config.ts for frontend unit testing

UI/UX Improvements

  • Added in-table edit popups for various field types (text, number, date/time, checkbox, single/multi-select)
  • Implemented EditablePropertyCell component for inline property editing
  • Added InfiniteScrollSentinel for lazy-loading lists
  • Created RowRefreshingGate context for row-level loading states
  • Added DueDateDisplay component with improved date formatting
  • Implemented list layout preference persistence (table vs. card view)

Backend Enhancements

  • Added task graph validation and application logic in task_graph.py
  • Implemented task preset resolvers with scope-based access control
  • Added database migrations for task presets and patient updated_at timestamp
  • Enhanced patient and task models with preset tracking
  • Added datetime normalization service for timezone handling

Localization

  • Added new translation keys for property clearing, time estimates, and discard confirmations
  • Updated all locale files (en-US, de-DE, es-ES, fr-FR, nl-NL, pt-BR)

Infrastructure

  • Consolidated GitHub Actions workflows into unified tests.yml with concurrency control
  • Updated Dockerfiles with pinned Alpine digest for reproducibility
  • Added .dockerignore files for cleaner builds
  • Updated dependencies (FastAPI 0.137.2, python-dotenv 1.2.2)
  • Modified Next.js dev script to use webpack explicitly

Documentation

  • Added AGENTS.md operational guide for AI contributors
  • Updated TESTING.md with consolidated workflow instructions

Notable Implementation Details

  • Task presets use a graph-based structure allowing complex task hierarchies and dependencies
  • Property clearing includes type-in confirmation to prevent accidental data loss
  • Pagination improvements support both contiguous and sparse page loading patterns
  • E2E tests use deterministic mocking to avoid external dependencies while testing real React/Apollo behavior
  • Optimistic updates maintain cache consistency during offline mutations

https://claude.ai/code/session_013kyTRPDs9AaH5newZrsw7X

felixevers and others added 30 commits March 22, 2026 13:12
…-drawer-close

Discard confirm dialog for drawer
---------

Co-authored-by: Felix Evers <git@felixevers.de>
* fix patient clinic source

---------

Co-authored-by: Felix Evers <git@felixevers.de>
---------

Co-authored-by: Felix Evers <git@felixevers.de>
* clear property feature

* feat: move mutations into backend

---------

Co-authored-by: Felix Thape <felix.thape@gmail.com>
…ktable

Issue/222 direct editing on tasktable
felixevers and others added 8 commits June 15, 2026 19:55
The inline AssigneeSelect cell in the task list reused the
`optimisticUpdates` map to flag rows on change. That map stores the
task's `done` state, so editing the assignee inline optimistically
checked the task in the UI even though the backend never changed it.

Remove the erroneous optimistic `done` updates from the assignee cell's
onValueChanged/onDialogClose handlers so changing the assignee no longer
visually completes the task.

Fixes #276


Claude-Session: https://claude.ai/code/session_01Y7Bjksr92VvB6dWQoJGZN9

Co-authored-by: Claude <noreply@anthropic.com>
* Truncate text properties to 32 characters in table views

Text (textarea) property values are now cut at 32 characters with a
trailing "..." in table cells, while the full value remains available
via the cell tooltip.

Closes #277

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1DT2nb74TG1FBfLamaMF1

* Truncate text property tooltip to 32 characters as well

The cell tooltip now shows the same 32-character truncated value with a
trailing "..." instead of the full text.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1DT2nb74TG1FBfLamaMF1

---------

Co-authored-by: Claude <noreply@anthropic.com>
Upgrade vulnerable backend dependencies to patched versions:

- python-dotenv 1.2.1 -> 1.2.2 (CVE-2026-28684)
- strawberry-graphql 0.287.3 -> 0.315.7 (CVE-2026-47706, CVE-2026-47707)
- pytest 8.3.4 -> 9.0.3 (CVE-2025-71176)
- fastapi 0.124.4 -> 0.137.2 to allow starlette >= 1.3.1
  (CVE-2026-48817/48818, CVE-2026-54282/54283); fastapi 0.124 capped
  starlette at < 0.51.0, pinning the vulnerable 0.50.0

Bump the pytest plugins required for pytest 9 compatibility
(pytest-asyncio 0.24.0 -> 1.4.0, pytest-cov 5.0.0 -> 7.1.0).

strawberry 0.315 enforces explicit type annotations on resolver
arguments, so annotate the previously untyped `info` parameters in
UserType (organizations, tasks, root_locations).

pip-audit reports no known vulnerabilities after the upgrade and the
full backend test suite (74 tests) passes.


Claude-Session: https://claude.ai/code/session_014Utr2YbmNw9NAyHHHnYpBa

Co-authored-by: Claude <noreply@anthropic.com>
@felixevers felixevers closed this Jun 19, 2026
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.

3 participants