Skip to content

refactor(apps): simplify query state and debounce URL writes#36043

Merged
lyzno1 merged 6 commits into
mainfrom
codex/apps-page-url-state
May 11, 2026
Merged

refactor(apps): simplify query state and debounce URL writes#36043
lyzno1 merged 6 commits into
mainfrom
codex/apps-page-url-state

Conversation

@lyzno1
Copy link
Copy Markdown
Member

@lyzno1 lyzno1 commented May 11, 2026

Summary

  • Reworked useAppsQueryState into a named, domain-specific hook API with query, setKeywords, setTagIDs, and setIsCreatedByMe.
  • Switched the apps search flow to nuqs parser-level debouncing for URL writes and ahooks useDebounce for TanStack Query input.
  • Removed the extra mirrored search state from the /apps list and kept the debounce constant in a local feature constant.
  • Updated list and hook tests to cover the new API and debounce behavior.

Testing

  • pnpm --dir web test app/components/apps/__tests__/list.spec.tsx app/components/apps/hooks/__tests__/use-apps-query-state.spec.tsx
  • web/node_modules/.bin/tsgo --project web/tsconfig.json --pretty false

@lyzno1 lyzno1 requested review from JzoNgKVO and iamjoel as code owners May 11, 2026 09:14
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. javascript Pull requests that update javascript code labels May 11, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label May 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

❌ Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.86%. Comparing base (a60cb3b) to head (9276b61).

Files with missing lines Patch % Lines
.../app/components/apps/hooks/use-apps-query-state.ts 93.75% 1 Missing ⚠️
web/app/components/apps/list.tsx 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #36043      +/-   ##
==========================================
- Coverage   85.86%   85.86%   -0.01%     
==========================================
  Files        4453     4454       +1     
  Lines      210742   210711      -31     
  Branches    39423    39410      -13     
==========================================
- Hits       180956   180929      -27     
+ Misses      26546    26542       -4     
  Partials     3240     3240              
Flag Coverage Δ
dify-ui 94.40% <ø> (ø)
web 86.61% <92.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1 lyzno1 requested a review from hyoban as a code owner May 11, 2026 09:19
@lyzno1 lyzno1 enabled auto-merge May 11, 2026 09:27
@lyzno1 lyzno1 disabled auto-merge May 11, 2026 09:28
hyoban
hyoban previously approved these changes May 11, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 11, 2026
@lyzno1 lyzno1 force-pushed the codex/apps-page-url-state branch from faab187 to 603fe16 Compare May 11, 2026 09:44
@lyzno1 lyzno1 force-pushed the codex/apps-page-url-state branch from 603fe16 to 9276b61 Compare May 11, 2026 09:52
@lyzno1 lyzno1 enabled auto-merge May 11, 2026 09:53
@lyzno1 lyzno1 added this pull request to the merge queue May 11, 2026
Merged via the queue into main with commit 59dab7d May 11, 2026
33 checks passed
@lyzno1 lyzno1 deleted the codex/apps-page-url-state branch May 11, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants