Commit graph

273 commits

Author SHA1 Message Date
323b7004ed Expose which search strategy produced each result
query_packages now assigns @search_sources - a hash mapping package
ids to the matching strategy that put them into the results: :exact,
:name_prefix, :name_contains, :semantic or :fulltext. The grid and
list views render a small badge with a humanized label per result,
making the search tiers observable. semantic_results() was folded
into search_packages() so each branch tags its own source. Adds the
rails-controller-testing gem for assigns() in tests.
2026-08-23 10:39:50 +02:00
4d07f43a2e Show related packages based on description embeddings
Package pages get a "Related packages" section: a nearest neighbor
query against the package's own stored embedding (no external service
call), excluding the package itself. Packages without an embedding
render no section.
2026-08-22 23:47:42 +02:00
4948fe50e3 Add semantic package search via pgvector embeddings
Package text search now combines several strategies: exact name match,
name prefix promotion, compound word splitting ("sqlite browser" finds
"sqlitebrowser") and semantic nearest neighbor search over description
embeddings computed by an external embedding service (all-MiniLM-L6-v2,
384 dims) stored with the pgvector extension. Classic PostgreSQL
full-text search remains as fallback when the vector service is
unreachable. Gibberish queries without lexical overlap with the package
data return empty results instead of random matches.

Embeddings can be backfilled with bin/rails debshots:compute_vectors.

Also drops the unused lograge gem from the Gemfile.
2026-08-22 22:07:56 +02:00
b601b2bbb6 move shrine files out of public. use x-sendfile to send files for security. 2025-06-16 00:24:11 +02:00
9cdf7b76fd remains of fontawesome 2025-06-08 16:34:16 +02:00
368d4b9c27 fix icon. re-enable javascript to define upload paths 2025-05-13 01:19:37 +02:00
1cd784cb14 recover broken apt:// link# 2025-05-13 01:19:15 +02:00
c3fecff878 change icons 2025-05-11 21:26:11 +02:00
d4196505b8 disable unused JS 2025-05-11 21:26:02 +02:00
d76bf164f1 lucene icons added, styling fixed 2025-05-09 00:41:11 +02:00
9164e2a636 Moved from Fancybox to Photoswipe for click-to-zoom 2025-05-08 01:10:03 +02:00
aaf1eb34c4 typo 2025-05-04 23:59:41 +02:00
fa8a7fc77a Fix JS and JS-based image upload 2025-05-02 00:38:42 +02:00
36984ff1d4 lab 2025-04-11 09:39:33 +02:00
33240846b2 Show hidden screenshots in a dark-grayish style 2021-03-21 22:05:22 +01:00
cc76ebcc28 Show abilities to hide/unhide properly 2021-03-21 22:02:56 +01:00
f9130c6972 Cruft 2021-03-10 01:04:43 +01:00
f31502c333 Added colors to status label of a screenshot 2021-03-10 01:04:06 +01:00
330536cb7e Link to packages and screenshots (highlighted) from logs view 2021-03-06 20:47:33 +01:00
86bfff58f2 System test added to verify auto-approval of screenshots from moderators 2021-03-02 01:56:25 +01:00
2b24083653 SQL optimisation rolled back. It lead to access problems. 2021-03-01 02:07:55 +01:00
7227f769c0 Avoid displaying unapproved screenshots in Any view 2021-03-01 01:23:52 +01:00
b36a49a6cd Avoid N+1 SQL queries with CanCanCan accessibility checks 2021-03-01 00:49:25 +01:00
eee196507b Forgot to run tests 2021-02-28 22:07:33 +01:00
7a3b65fe50 Authorisation management using CanCanCan added 2021-02-28 21:36:46 +01:00
c0144a79c7 Typo 2021-02-21 17:04:57 +01:00
5889f70a4d Don't show anything in list view if there is no long description 2021-02-21 16:43:57 +01:00
940b3a16fa Slightly less ugly list view 2021-02-21 15:57:42 +01:00
46352afc58 More dots-in-URLs-routing-issues workarounds 2021-02-21 11:12:53 +01:00
f68482f850 Simplification 2021-02-21 11:12:35 +01:00
75083eed6f Fix: show Delete button to admins 2021-02-20 22:27:22 +01:00
2297059e84 Trivial rewording 2021-02-20 22:24:41 +01:00
eaa81e45ed Fix card view. image class was missing. 2021-02-20 22:23:37 +01:00
b41c78abbf Add user hint to use Ctrl-V 2021-02-20 22:23:23 +01:00
0f20a53554 Allow Ctrl-V uploads from details and upload view 2021-02-20 22:23:10 +01:00
44a7f31bd4 Fixed broken maginifying glass effect 2021-02-20 21:49:16 +01:00
e5b867fc16 JS display paste-upload errors directly 2021-02-20 21:18:47 +01:00
9bd01ff30b Put striped background behind unapproved images 2021-02-20 21:18:17 +01:00
afe6f7ed7f Moved ctrl-v upload Javascript back to controller 2021-02-20 16:39:44 +01:00
1d364de8c8 Handle uploads using Ctrl-V 2021-02-18 01:59:40 +01:00
499c59b761 Render delete button partial for users 2021-02-18 01:59:16 +01:00
102ea7e67c Displaying delete button for user's own upload 2021-02-18 01:58:04 +01:00
953cd056aa Clearer links in paginator 2021-02-14 18:01:46 +01:00
3f0737c614 Fix 404 for missing package 2021-02-14 16:51:55 +01:00
9a91229336 Fixed size and choice of dummy images 2021-02-14 16:41:52 +01:00
1f7ba785a1 One partial view eliminated 2021-02-14 15:33:22 +01:00
dc5e6d151b One SQL query per view saved 2021-02-14 15:32:37 +01:00
c636ee40a5 Simplified browsing view 2021-02-14 11:14:13 +01:00
fce8fe2dce Renamed. The image was actually the small version. 2021-02-14 10:35:50 +01:00
7788025cf7 Properly show screenshots visible to the user 2020-11-23 00:21:40 +01:00