-
-
Notifications
You must be signed in to change notification settings - Fork 597
Feat/total image count #1010
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
Feat/total image count #1010
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,6 +88,7 @@ | |
| "@vitejs/plugin-react": "^4.2.1", | ||
| "autoprefixer": "^10.4.20", | ||
| "babel-jest": "^29.7.0", | ||
| "baseline-browser-mapping": "^2.9.11", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's check the package.json file to confirm the dependency
cat -n frontend/package.json | head -100Repository: AOSSIE-Org/PictoPy Length of output: 4146 🏁 Script executed: # Search for any usage of baseline-browser-mapping in the codebase
rg "baseline-browser-mapping" --type js --type json -A 2 -B 2Repository: AOSSIE-Org/PictoPy Length of output: 1775 🏁 Script executed: # Also search for any imports or references to this package
rg "baseline.*browser.*mapping" --type js --type ts --type jsonRepository: AOSSIE-Org/PictoPy Length of output: 563 🏁 Script executed: # Check what packages depend on baseline-browser-mapping
rg "baseline-browser-mapping" frontend/package-lock.json -B 20 | grep -E '"(name|requires|dependencies)"' | head -30Repository: AOSSIE-Org/PictoPy Length of output: 85 🏁 Script executed: # Search for any configuration files that might use it
find frontend -type f \( -name "jest.config.*" -o -name "postcss.config.*" -o -name "babel.config.*" -o -name ".babelrc*" \) -exec cat {} \;Repository: AOSSIE-Org/PictoPy Length of output: 753 🏁 Script executed: # Check if it's referenced in any scripts or configuration
rg "baseline" frontend --type json --type js --type ts -iRepository: AOSSIE-Org/PictoPy Length of output: 563 🏁 Script executed: # Check which package in package-lock.json has baseline-browser-mapping as a dependency
python3 <<'EOF'
import json
import sys
with open('frontend/package-lock.json', 'r') as f:
lock_data = json.load(f)
packages = lock_data.get('packages', {})
for pkg_name, pkg_info in packages.items():
if 'dependencies' in pkg_info:
if 'baseline-browser-mapping' in pkg_info['dependencies']:
print(f"Package '{pkg_name}' depends on baseline-browser-mapping: {pkg_info['dependencies']['baseline-browser-mapping']}")
EOFRepository: AOSSIE-Org/PictoPy Length of output: 148 🏁 Script executed: # Also check the dependencies of autoprefixer and caniuse which often pull in browser mappings
rg "\"autoprefixer\"" frontend/package-lock.json -A 15 | head -40Repository: AOSSIE-Org/PictoPy Length of output: 1193 Remove This package is explicitly listed but has no usage anywhere in the codebase—not in any code files, configuration files, or npm scripts. It's a CLI tool for browser mapping that's unrelated to the PR objective of displaying total image count and appears to be an accidental inclusion. 🤖 Prompt for AI Agents |
||
| "eslint": "^8.57.1", | ||
| "eslint-config-prettier": "^9.1.0", | ||
| "eslint-config-react-app": "^7.0.1", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider perf + error semantics of COUNT(*) on every
/all-folderscallThis correctly wires
total_imagesinto the response, but a full-tableCOUNT(*)can become expensive at scale, and returning0on error (perdb_get_total_image_count) can silently mislead the UI. Consider either caching/materializing the count (or computing it alongside existing queries), and/or propagating an error (or a nullable field) instead of defaulting to0on DB failure.Also applies to: 464-472
🤖 Prompt for AI Agents