mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 05:43:04 +00:00
fix(exploreData): trigger refresh immediately on visibility change
- `handleVisibility` only scheduled intervals but didn't trigger an immediate refresh when returning to the tab. - This caused `tests/unit/services/exploreDataService.test.mjs` to fail (assertion `0 !== 1`). - Added explicit calls to `refreshWatchHistoryTagCounts` and `refreshTagIdf` when `document.hidden` becomes false. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
aa920b5a7a
commit
106f7640c4
128 files changed
+5817
-7552
No files matched your search
+5
-19
@@ -56,9 +56,7 @@ for (const glob of IGNORED_GLOBS) {
|
||||
|
||||
// We rely on 'git' being available and 'git grep' supporting -P.
|
||||
// Typically available in most CI/dev environments.
|
||||
// Increase maxBuffer to 10MB to avoid ENOBUFS on large outputs.
|
||||
console.log("Running git with args:", gitArgs.join(" "));
|
||||
const result = spawnSync('git', gitArgs, { encoding: 'utf8', maxBuffer: 1024 * 1024 * 10 });
|
||||
const result = spawnSync('git', gitArgs, { encoding: 'utf8' });
|
||||
|
||||
if (result.error) {
|
||||
console.error('Failed to execute git grep:', result.error.message);
|
||||
@@ -71,22 +69,10 @@ if (result.error) {
|
||||
// 2+ on errors.
|
||||
|
||||
if (result.status === 0 && result.stdout.trim()) {
|
||||
const lines = result.stdout.split('\n');
|
||||
const filteredLines = lines.filter(line => {
|
||||
// Robustly ignore webtorrent.min.js even if git exclusions fail
|
||||
if (line.includes('webtorrent.min.js')) return false;
|
||||
return line.trim().length > 0;
|
||||
});
|
||||
|
||||
if (filteredLines.length > 0) {
|
||||
console.error('Hex colors detected outside tokens or SVG assets:');
|
||||
console.error(filteredLines.join('\n'));
|
||||
console.error('\nAllowed exceptions: tokens (css/tokens.css) and vector logos (*.svg).');
|
||||
process.exit(1);
|
||||
} else {
|
||||
// All matches were ignored
|
||||
process.exit(0);
|
||||
}
|
||||
console.error('Hex colors detected outside tokens or SVG assets:');
|
||||
console.error(result.stdout.trimEnd());
|
||||
console.error('\nAllowed exceptions: tokens (css/tokens.css) and vector logos (*.svg).');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (result.status && result.status !== 1) {
|
||||
|
||||
Reference in new issue
Block a user