codefloe/forgejo-codefloe
Watch
4
12
Fork
You've already forked forgejo-codefloe
0

feat(search): update page results as users type #112

Merged
pat-s merged 2 commits from t3code/implement-search-on-type into v16.0/forgejo-codefloe 2026-09-08 12:08:54 +00:00
Owner

Page searches on organization profiles, user repositories and stars, the watched repositories list, and Explore repositories, users, and organizations currently require submission.
Update results and pagination in place after a 300 ms typing pause, retaining input focus, filters, and a shareable query URL.

Use the existing htmx integration to show loading feedback and cancel superseded requests.
Preserve Enter/button submission and the JavaScript-free form fallback, wait for composition input, and refresh sorting and relevance links with the current query.

The htmx attributes live in templates/shared/codefloe_search_form_attrs.tmpl and the results wrapper in templates/shared/codefloe_search_results.tmpl, so each upstream template only gains a one-line call.
Only the children of the wrapper are swapped, which keeps the aria-live region, the loading indicator, and an open sort dropdown intact.
web_src/js/codefloe/live-search.js mirrors the request URL into the address bar without handing history over to htmx, and falls back to a plain navigation when a response carries no results fragment.
The repository administration page keeps the plain form because its table binds per-row JS handlers.

Validation: 30 Playwright checks passed on desktop and mobile Chromium against the local Forgejo test server, covering all seven live pages and the admin opt-out, the persistent live region, divider spacing, debounce timing, pagination reset, filter preservation, composition input, cancellation with an open sort menu, the no-fragment fallback, and submission without JavaScript.
Firefox could not be launched on agent-dev because host libraries are missing.
The frontend build, ESLint, stylelint, TypeScript check, and diff whitespace check also passed.

Page searches on organization profiles, user repositories and stars, the watched repositories list, and Explore repositories, users, and organizations currently require submission. Update results and pagination in place after a 300 ms typing pause, retaining input focus, filters, and a shareable query URL. Use the existing htmx integration to show loading feedback and cancel superseded requests. Preserve Enter/button submission and the JavaScript-free form fallback, wait for composition input, and refresh sorting and relevance links with the current query. The htmx attributes live in `templates/shared/codefloe_search_form_attrs.tmpl` and the results wrapper in `templates/shared/codefloe_search_results.tmpl`, so each upstream template only gains a one-line call. Only the children of the wrapper are swapped, which keeps the `aria-live` region, the loading indicator, and an open sort dropdown intact. `web_src/js/codefloe/live-search.js` mirrors the request URL into the address bar without handing history over to htmx, and falls back to a plain navigation when a response carries no results fragment. The repository administration page keeps the plain form because its table binds per-row JS handlers. Validation: 30 Playwright checks passed on desktop and mobile Chromium against the local Forgejo test server, covering all seven live pages and the admin opt-out, the persistent live region, divider spacing, debounce timing, pagination reset, filter preservation, composition input, cancellation with an open sort menu, the no-fragment fallback, and submission without JavaScript. Firefox could not be launched on agent-dev because host libraries are missing. The frontend build, ESLint, stylelint, TypeScript check, and diff whitespace check also passed.
pat-s force-pushed t3code/implement-search-on-type from 48dd0123e5
All checks were successful
testing / frontend-checks (pull_request) Successful in 1m3s
testing / backend-checks (pull_request) Successful in 5m22s
testing / test-remote-cacher (redis) (pull_request) Successful in 1m23s
testing / test-remote-cacher (garnet) (pull_request) Successful in 1m23s
testing / test-unit (pull_request) Successful in 6m53s
testing / test-remote-cacher (valkey) (pull_request) Successful in 1m23s
testing / test-e2e (pull_request) Successful in 27m46s
testing / test-sqlite (pull_request) Successful in 44m12s
testing / test-mysql (pull_request) Successful in 30m8s
testing / test-pgsql (pull_request) Successful in 47m16s
to fff7223a6d
All checks were successful
testing / test-remote-cacher (valkey) (pull_request) Successful in 1m5s
testing / test-remote-cacher (redis) (pull_request) Successful in 1m35s
testing / frontend-checks (pull_request) Successful in 1m2s
testing / backend-checks (pull_request) Successful in 5m26s
testing / test-unit (pull_request) Successful in 6m52s
testing / test-remote-cacher (garnet) (pull_request) Successful in 1m4s
testing / test-mysql (pull_request) Successful in 30m44s
testing / test-e2e (pull_request) Successful in 29m2s
testing / test-pgsql (pull_request) Successful in 47m50s
testing / test-sqlite (pull_request) Successful in 44m41s
2026-09-08 11:07:48 +00:00
Compare
docs(readme): document search as you type
All checks were successful
testing / frontend-checks (pull_request) Successful in 59s
testing / test-unit (pull_request) Successful in 10m47s
issue-labels / backporting (pull_request_target) Has been skipped
milestone / set (pull_request_target) Has been skipped
testing / backend-checks (pull_request) Successful in 7m13s
testing / test-sqlite (pull_request) Successful in 51m12s
testing / test-remote-cacher (garnet) (pull_request) Successful in 1m6s
testing / test-remote-cacher (valkey) (pull_request) Successful in 1m6s
testing / test-remote-cacher (redis) (pull_request) Successful in 1m42s
testing / test-mysql (pull_request) Successful in 34m55s
testing / test-e2e (pull_request) Successful in 32m34s
testing / test-pgsql (pull_request) Successful in 54m14s
156d94cb1c
pat-s merged commit 6cec690c2a into v16.0/forgejo-codefloe 2026-09-08 12:08:54 +00:00
pat-s deleted branch t3code/implement-search-on-type 2026-09-08 12:08:55 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
codefloe/forgejo-codefloe!112
No description provided.