fix: Keep filter between actions in Home view (#9)
* fix: keep filter selection between actions in Home view When a user selects a filter (Tasks, Notes, or a tag) and performs an action like marking a task as done or deleting a note, the filter is now preserved after the data reload. - Extract applyFilter() helper that accepts explicit task/note arrays to avoid stale state closure issues - loadAllTasks() now re-applies the current selectedOption and filterText after fetching fresh data instead of resetting to 'everything' - loadAllNotes() now re-applies the current filter after fetching fresh data - Add 3 new tests verifying filter persistence after actions Fixes #8 Co-authored-by: Ricardo Campos <RMCampos@users.noreply.github.com> * feat: fix race condition as per Claude review * ci: add CI to client --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Ricardo Campos <RMCampos@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
co-authored by
claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Ricardo Campos
parent
5f61c1121f
commit
b6ae920673
@@ -0,0 +1,51 @@
|
||||
name: React App CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
paths:
|
||||
- 'client/**/*.html'
|
||||
- 'client/**/*.png'
|
||||
- 'client/**/*.json'
|
||||
- 'client/**/*.txt'
|
||||
- 'client/**/*.ts'
|
||||
- 'client/**/*.tsx'
|
||||
- 'client/**/*.js'
|
||||
- 'client/Dockerfile'
|
||||
- 'client/Caddyfile'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: ./client
|
||||
|
||||
- name: Run lint
|
||||
run: npm run lint
|
||||
working-directory: ./client
|
||||
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
working-directory: ./client
|
||||
|
||||
- name: Run tests
|
||||
run: npm test -- --watchAll=false
|
||||
working-directory: ./client
|
||||
Reference in New Issue
Block a user