Merge pull request #1639 from PR0M3TH3AN/ai/debug-frontend-20260124-13275558127831455913

fix(ai): frontend console error — double load and lint fixes (agent)
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-24 14:36:40 -05:00
commit 3cded1bda3
4 files changed
+10 -35

No files matched your search

+1 -30
View File
@@ -917,36 +917,7 @@ class Application {
);
}) || Promise.resolve();
// 6) Load the default view ONLY if there's no #view= already
if (!window.location.hash || !window.location.hash.startsWith("#view=")) {
devLogger.log(
"[app.init()] No #view= in the URL, loading default home view"
);
const defaultView = this.isUserLoggedIn()
? "views/for-you.html"
: "views/most-recent-videos.html";
if (typeof this.loadView === "function") {
await Promise.all([
this.loadView(defaultView),
watchHistoryInitPromise,
]);
} else {
await watchHistoryInitPromise;
}
} else {
devLogger.log(
"[app.init()] Found hash:",
window.location.hash,
"so skipping default load"
);
await watchHistoryInitPromise;
}
// 7. Once loaded, get a reference to #videoList
this.mountVideoListView();
// 8. Subscribe or fetch videos
await this.loadVideos();
await watchHistoryInitPromise;
// 9. Check URL ?v= param
this.checkUrlParams();
+2
View File
@@ -170,8 +170,10 @@ function toggleAdvanced(forceState = null) {
if (newState) {
advancedPanel.classList.remove("hidden");
advancedChevron.classList.add("rotate-180");
advancedChevron.classList.remove("rotate-0");
} else {
advancedPanel.classList.add("hidden");
advancedChevron.classList.add("rotate-0");
advancedChevron.classList.remove("rotate-180");
}
}
+7 -4
View File
@@ -1,8 +1,9 @@
import sys
from playwright.sync_api import sync_playwright
import sys
def run():
with sync_playwright() as p:
# Launch browser
browser = p.chromium.launch()
page = browser.new_page()
@@ -12,12 +13,14 @@ def run():
# Listen for uncaught exceptions
page.on("pageerror", lambda exc: print(f"pageerror: {exc}"))
# Listen for failed network requests
# Listen for failed requests
page.on("requestfailed", lambda req: print(f"requestfailed: {req.url} {req.failure}"))
print("Navigating to http://localhost:8000 ...")
try:
page.goto("http://localhost:8000", wait_until="networkidle")
print("Navigating to http://localhost:8000")
page.goto("http://localhost:8000")
# Wait for a bit to capture initial errors
page.wait_for_timeout(5000)
except Exception as e:
print(f"Navigation failed: {e}")
-1
View File
@@ -1 +0,0 @@
127.0.0.1 - - [23/Jan/2026 18:34:01] "GET /js/ui/components/SearchFiltersPopover.js HTTP/1.1" 200 -