Fix web templates, multi-word search, suggest prioritization, and log pollution#92
Merged
Merged
Conversation
…og levels, and help Co-authored-by: AdmGenSameer <154604600+AdmGenSameer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix template not found error and add web command
Fix web templates, multi-word search, suggest prioritization, and log pollution
Dec 9, 2025
AdmGenSameer
marked this pull request as ready for review
December 9, 2025 08:03
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
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.
Description
Resolves 6 issues: web interface template loading failures, multi-word package search not finding matches, suggest command showing wrong results for common queries like "coding", and noisy error logs from unavailable package managers.
Related Issue
Changes Made
Web Interface Template Fix
templates/*.htmlandtemplates/**/*topyproject.tomlpackage-dataweb.pyusingos.path.join(base_dir, 'templates')Multi-word Search Query Normalization
normalize_query()function generating 3 variations per query:Suggest Command Prioritization
code-editorintent:code,vscode,vscodiumnow firstClean Console Output
ERRORtoDEBUGfor "command not found" in:search_snap.pyline 54search_flatpak.pyline 53Enhanced Help Message
Screenshots or GIFs (if applicable)
N/A - CLI/backend changes
Checklist
.prettierrc(if present).Additional Notes
Example: Multi-word search normalization
Security: CodeQL scan passed with 0 alerts. All changes are backward compatible.
Original prompt
Comprehensive Fix for Multiple Issues
Issue 1: Web Interface Template Error
Error:
jinja2.exceptions.TemplateNotFound: home.htmlRoot Cause:
pyproject.tomldoesn't include HTML templates in package-dataweb.pydoesn't specify explicit template folder pathFix in
pyproject.toml:Fix in
archpkg/web.py:Issue 2: Add
archpkg webCommandThe web interface exists but there's no CLI command to launch it.
Add to
cli.py:Issue 3: Suggest Shows Wrong First Result
When user searches "coding",
neovim-qtappears first instead ofcode/vscode/vscodium.Root Cause: The scoring algorithm in
suggest.pydoesn't properly prioritize popular/mainstream apps.Fix: Add priority boost for popular apps in the suggest module:
And boost scores for these apps when they match the detected intent.
Issue 4: Multi-word Search Doesn't Find Packages
archpkg search jellyfin media playerfinds nothing, butjellyfin-media-playerworks.Root Cause: The search algorithm doesn't try variations of the query (with hyphens, without spaces, etc.)
Fix: Add query normalization to try multiple variations:
Then search for all variations and combine results.
Issue 5: Snap/Flatpak Errors Pollute Output
When Snap isn't installed, users see error messages:
Fix: Suppress these logs from console output while still logging to file:
Issue 6: Enhanced Help Message
Combine the original comprehensive help with new features from PR #66.
Add to CLI callback or help command: