-
Notifications
You must be signed in to change notification settings - Fork 3
New user-editable tags #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
davidp57
wants to merge
30
commits into
sam1am:main
Choose a base branch
from
davidp57:feat-multiple-edit-tags-and-actions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
New user-editable tags #27
davidp57
wants to merge
30
commits into
sam1am:main
from
davidp57:feat-multiple-edit-tags-and-actions
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add PREDEFINED_QUERIES with 18 filters across 4 categories - Implement global filter persistence via localStorage - Convert /random to full page with configurable game grid - Add comprehensive test suite (69 tests, 100% passing) - Optimize performance with indexes and query caching - Document complete filter system architecture - Remove 'apply globally' checkbox for simpler UX
- Add .github/ and openspec/ to .gitignore - Remove tracked files from these directories - These folders contain local workflow configurations
This reverts commit 7c2aff9.
…est case) Based on this review: > SQL errors on collection detail page The .replace() chain in collections.py for prefixing column names with g. only covers 5 columns (playtime_hours, total_rating, added_at, release_date, nsfw). Filters like "community-favorites" (igdb_rating, igdb_rating_count), "critic-favorites" (aggregated_rating), and "recently-updated" (last_modified) will throw SQL errors when used on collection pages.
Based on this review:
Genre LIKE pattern missing closing quote
In discover.py, library.py (random route), and collections.py:
params.append(f'%"{genre.lower()}%')
Should be:
params.append(f'%"{genre.lower()}"%')
Without the closing ", the pattern %"action% could match unintended substrings.
Based on this review: > Duplicate import in discover.py get_query_filter_counts is imported twice on the same line.
- corrected json import in loop - made bare exception handling less bare Based on these reviews: > Bare except: clauses In collections.py and discover.py, the genre parsing uses bare except: which swallows all exceptions including KeyboardInterrupt and SystemExit. Please use except Exception: at minimum, or better yet except (json.JSONDecodeError, TypeError):. > import json inside a loop In collections.py, import json is inside the genre-parsing loop — should be at the top of the file.
Based on this review:
> TemplateResponse signature change
All TemplateResponse calls were changed from TemplateResponse("template.html", {"request": request, ...}) to TemplateResponse(request, "template.html", {...}). This requires a newer Starlette version. Since we don't pin versions in requirements.txt, this could break depending on the installed version. Can you either pin the minimum required version or keep the old signature?
… button) Based on this review: > Auto-apply conflicts with Apply button The store/genre dropdowns have explicit "Apply" buttons, but filters.js also auto-applies after a 300ms debounce on checkbox changes. Users could get redirected before they finish selecting multiple options. I'd suggest picking one approach — either auto-apply (and remove the button) or manual apply (and remove the debounce).
… button) ; also, changed the filters logic (see filter-system.md) to combine filters with ORs in the same category and with ANDs between categories. Based on this review: > Auto-apply conflicts with Apply button The store/genre dropdowns have explicit "Apply" buttons, but filters.js also auto-applies after a 300ms debounce on checkbox changes. Users could get redirected before they finish selecting multiple options. I'd suggest picking one approach — either auto-apply (and remove the button) or manual apply (and remove the debounce).
Based on this review: > Mobile regression The old index.html had mobile-specific styles transforming dropdowns into bottom sheets. The new filters.css responsive section only does flex-direction: column — the bottom-sheet behavior appears to be lost. Could you verify the filter bar works well on mobile?
Based on these reviews:
> query_filter_counts is always {} for discover, collection detail, and random pages — the Quick Filters dropdown won't show counts on those pages (intentional?)
> Dead .games-grid CSS rule with flex properties in index.html (overridden by the grid definition later — looks like a copy-paste artifact)
…ters Changes the /random endpoint to redirect to a single random game (instead of showing a grid of 12 games), while applying global filters before selection. Changes: - Modified /random route to apply filters then redirect to one game - Added filters.js to all pages with Random links to ensure filter persistence - Removed random.html template and shared-game-cards.css (no longer needed) - Updated documentation to reflect new behavior This addresses PR review feedback requesting the original "surprise me with one game" behavior while maintaining global filter support. > /random endpoint behavior change This currently redirects to a single random game detail page. The PR changes it to render a full grid of 12 games. I'd like to discuss this — I'm not sure I want to lose the "surprise me with one game" behavior. Could we keep the old redirect as the default and add the grid as a separate route (e.g. /random?grid=true) or a different path?
Phase 1 & 2: Backend implementation for unified labels system - Migrate collections to labels with new fields (type, color, icon, system) - Add priority (high/medium/low) and personal_rating (0-10) columns to games - Create system_labels service with 5 auto playtime tags - Add API endpoints for priority and personal rating (single + bulk) - Add manual playtime tag endpoint for non-Steam games - Update delete endpoints to use game_labels instead of collection_games Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Phase 3 (partial): Frontend UI for priority and personal rating - Add Priority and Personal Rating buttons to floating action bar - Add dropdown menus for selecting priority (high/medium/low) and rating (0-10) - Add JavaScript functions for bulk operations (bulkSetPriority, bulkSetPersonalRating) - Add CSS styling for new buttons and dropdown menus - Auto-close dropdowns when clicking outside Next: Add badges display on game cards, update filters, add sync hooks Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added visual badges on game cards to display: - Priority indicators (high/medium/low) with colored circles - Personal rating badges with star icons and numeric value Badges are positioned in top-left corner of card covers with: - Backdrop blur for readability - Responsive sizing for different grid sizes - Proper z-index layering above cover images Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Migrated all collections endpoints to use the new unified labels system: - Changed table references from collections/collection_games to labels/game_labels - Added type='collection' filters to all queries - Updated column references (c.* to l.*, cg.* to gl.*) - Maintained all existing API endpoints and functionality Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added "Playtime Tag" button to action bar with dropdown menu: - 5 manual playtime tags: never-launched, just-tried, played, well-played, heavily-played - Remove tag option - Styled with blue color scheme to differentiate from priority/rating - JavaScript function calls individual game endpoint for each selected game - Auto-reloads page after applying tags Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed JavaScript parameter from tag_name to label_name to match the Pydantic model definition in api_metadata.py Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changes: - Changed all system label names from French to English - Added migration logic in ensure_system_labels() to update existing labels - Fixed manual playtime tag endpoint to handle null (remove tag) - Updated template dropdown to use English label names - All 5 playtime tags now visible in UI Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Show dropdown first with visibility:hidden to get actual height - Position dropdown above button using calculated height - Close other dropdowns when opening playtime menu - Prevents menu from being cut off at bottom of screen Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added toast notification system with slide-in animations - Toasts appear in top-right corner without interrupting workflow - Success (green), error (red), and info (blue) variants - Auto-dismiss after 3 seconds or click to close manually - Replaced all alert() calls with showToast() - More elegant and less disruptive UX Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Hold Shift and click to select all games between two selections - More efficient for selecting multiple consecutive games - Tracks last selected card for range calculation - Works seamlessly with normal click selection Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added inline action buttons on game detail page for: - Set Priority (high/medium/low/none) - Personal Rating (0-10) - Playtime Tag (5 system tags + remove) Features: - Compact button design integrated in hero section - Dropdown menus for each action - Toast notifications for feedback - Auto-reload after changes - No need to go to library for tagging single games Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
Author
|
Hi @sam1am! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📋 Overview
This PR adds editable tags for the games.
Tags are grouped by categories:
The tags are visible in both the library and the details pages.
In addition, the user is able to select multiple games in the library view (either by individually clicking on them after started the selection mode, or by shift and/or control clicking to select an interval).
I've also added "hide", "mark NSFW" and "delete" actions to the edit bar.
✅ Test Coverage: 177/177 passing
New Test Files (65 tests)
tests/test_api_metadata_endpoints.py- 35 testsComplete API integration tests covering all metadata endpoints:
tests/test_database_migrations.py- 12 testsDatabase schema migrations and constraints:
tests/test_edge_cases_labels.py- 13 testsEdge cases and performance tests:
tests/test_system_labels_auto_tagging.py- +5 testsManual tag persistence tests added to existing suite:
📚 Documentation
New Files
docs/api-metadata-endpoints.md(~700 lines)Complete API reference with:
docs/contributing-labels-system.md(~600 lines)Developer contribution guide:
Enhanced Files
docs/system-labels-auto-tagging.md(+~400 lines)User documentation enriched with:
🔧 Technical Fixes
get_dbimport in test fixtures (useweb.dependenciesinstead ofweb.database)check_same_thread=Falseto SQLite test connections for FastAPI compatibility📊 CHANGELOG
Updated
CHANGELOG.mdwith complete documentation of:🎯 Testing
All tests pass successfully:
pytest tests/ -v # 177 passed in ~15sTest coverage includes:
🔍 Code Quality
📝 Checklist
🚀 Ready for Review
This PR completes the test and documentation requirements for the labels/metadata system. All functionality is thoroughly tested and documented for both users and developers.