Commit graph

233 commits

Author SHA1 Message Date
fd5747c6ab Deduplicate search results by package name
If the database ever contains duplicate-name rows again, users should
not see the same package twice in the results.
2026-08-23 21:25:28 +02:00
07be9eadcc Remove the temporary show=libs inspection view
The libs-section blacklist is confirmed safe; the review view has
served its purpose.
2026-08-23 14:13:53 +02:00
a98398f7a1 Limit show=libs inspection view to packages with screenshots 2026-08-23 12:33:28 +02:00
3a1de72efe Add temporary show=libs inspection view
Lets you browse exactly the packages that the libs section blacklist
would remove on the next import, to review them visually before
running it.
2026-08-23 11:20:36 +02:00
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
0669198233 safety check 2026-02-26 00:28:00 +01:00
9d0009b129 return approved screenshots only in public json. fixes #96 2026-02-04 00:10:26 +01:00
19f85a27d6 logic made nicer 2025-06-26 23:33:32 +02:00
eb198a491b fixing /screenshot/:name 2025-06-23 00:46:23 +02:00
5ca2920d9d make sure that images are only delivered if the user has view permission 2025-06-18 01:36:17 +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
36984ff1d4 lab 2025-04-11 09:39:33 +02:00
25672aabb0 Update to Rails 7.2 2025-02-25 21:57:16 +01:00
2ec80b4bde Automatic rubocop cleanups 2025-02-03 01:08:08 +01:00
890906929f Added missing jbuilder
This was the reason why JSON output was incorrectly formatted.
2024-08-05 16:19:32 +02:00
778465fe0b Keep previous format of JSON repsonses before Rails 7 2024-07-29 20:12:33 +02:00
daa6d7c4b4 Fix JSON output for Rails 7 2024-07-22 00:00:06 +02:00
7fe26d471e Do not return unapproved screenshots 2024-07-21 23:59:54 +02:00
d9e4f7416f Added audit logging for users logging in via oauth 2021-04-26 23:08:10 +02:00
9635b3968c Added per-user counter of approved/rejected screenshots 2021-03-21 23:06:51 +01:00
a51e712925 Security fix. Prevent unauthorized deletion.
Legacy anonymous screenshot uploads could have been deleted by anonymous
users.
2021-03-21 16:24:35 +01:00
7e7b40f412 Choose a random package for the main page to ask for screenshots 2021-03-14 16:40:01 +01:00
5d0e4a520e Allow hiding and un-hiding of screenshot by moderators 2021-03-10 01:04:37 +01:00
0207d6b392 My views improved. Own screenshots view added 2021-03-09 22:43:58 +01:00
15b58548cc Show more log lines per page 2021-03-06 20:51:48 +01:00
330536cb7e Link to packages and screenshots (highlighted) from logs view 2021-03-06 20:47:33 +01:00
2fef9c7043 Audit logging improved. References users, screenshots, packages 2021-03-03 23:21:24 +01:00
b6dee6b93c Logging fixed. Debugging finished. 2021-03-03 01:29:26 +01:00
bc7541a2c9 More IP debugging 2021-03-03 01:15:50 +01:00
fe5655e6d5 Add mandatory new parameter for remote_ip to Log.log 2021-03-03 01:06:08 +01:00
d41220c5fd Basic browser for audit logs added 2021-03-03 01:05:35 +01:00
1c2bfb87d3 Cruft removed. @remote_ip populated globally 2021-03-03 01:04:59 +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
ce9e1d8877 Typo that prevented deleting images 2021-03-01 01:02:39 +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
7004e14a88 Recovered moderate controller
It may not be necessary but deployment fails as it is refererred to from
other modules
2021-02-28 21:45:31 +01:00
7a3b65fe50 Authorisation management using CanCanCan added 2021-02-28 21:36:46 +01:00
b7cc7ef4c0 Removed occurence of removed code 2021-02-28 02:09:29 +01:00
58f5eb11b9 Cruft of old Debian SSO code 2021-02-28 02:04:07 +01:00
bc507cbe39 Salsa login works 2021-02-27 23:50:51 +01:00
1f9187e35c Add ActionMailer to inform admins about new screenshots
This version only informs Christoph as a test
2021-02-25 02:43:14 +01:00
c6bea9b902 Add moderation hint below top bar 2021-02-24 23:47:30 +01:00
ec43f47f92 Show Moderate link in topbar. Add menu icons. 2021-02-24 19:18:19 +01:00
ff5643756e Removed auto-approve 2021-02-21 19:41:20 +01:00
896cd533b4 minor improvement 2021-02-21 16:43:02 +01:00
1a21007068 Properly detect duplicate uploads 2021-02-21 11:38:53 +01:00