fix: remove duplicate deep link handler in App.tsx

A deep link handler already existed at line 275 (with proper project
switching and test coverage). The duplicate added earlier caused double
toast rendering in tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-03 14:17:30 -07:00
parent 339a69d5f8
commit 6a38b001ba

View File

@@ -197,27 +197,6 @@ function AppInner() {
.catch(() => {/* keep empty array on failure */});
}, []);
// Handle deep link to task on mount (from ntfy Click URLs)
useEffect(() => {
const params = new URLSearchParams(window.location.search);
const taskId = params.get("task");
if (!taskId) return;
// Clean URL immediately without reloading
const url = new URL(window.location.href);
url.searchParams.delete("task");
url.searchParams.delete("project");
window.history.replaceState({}, "", url.toString());
fetchTaskDetail(taskId)
.then((task) => {
handleDetailOpen(task);
})
.catch(() => {
addToast(`Task ${taskId} not found`, "error");
});
}, []); // eslint-disable-line react-hooks/exhaustive-deps
// Favorite provider/model toggle handlers (shared by ListView bulk edit)
const handleToggleFavorite = useCallback(async (provider: string) => {
const currentFavorites = favoriteProviders;