Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions apps/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"action": {
"default_title": "Cornell Loop",
"default_icon": {
"16": "popup_icon.png",
"32": "popup_icon.png",
"48": "popup_icon.png",
"128": "popup_icon.png"
"16": "loop_logo.png",
"32": "loop_logo.png",
"48": "loop_logo.png",
"128": "loop_logo.png"
}
},
"icons": {
"16": "popup_icon.png",
"32": "popup_icon.png",
"48": "popup_icon.png",
"128": "popup_icon.png"
"16": "loop_logo.png",
"32": "loop_logo.png",
"48": "loop_logo.png",
"128": "loop_logo.png"
},
"background": {
"service_worker": "src/background.ts",
Expand Down
27 changes: 18 additions & 9 deletions apps/extension/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ export interface AppProps {
onPreviewSlot?: (event: EventItem | null) => void;
}

const DASHBOARD_URL =
(import.meta.env.VITE_DASHBOARD_URL as string | undefined) ??
"https://cornellloop.com";
const DASHBOARD_URL = (() => {
const value = import.meta.env.VITE_DASHBOARD_URL;
return typeof value === "string" && value.length > 0
? value
: "https://cornellloop.com";
})();

export default function App({
onClose,
Expand Down Expand Up @@ -59,9 +62,9 @@ export default function App({
const isSearchMode = view === "search" || view === "email";

const handleTabChange = (tab: string) => {
const t = tab as "feed" | "bookmarks";
setActiveTab(t);
setView(t);
if (tab !== "feed" && tab !== "bookmarks") return;
setActiveTab(tab);
setView(tab);
setEmailEvent(null);
};

Expand Down Expand Up @@ -92,7 +95,7 @@ export default function App({
style={{ boxShadow: "0px 4px 16px rgba(0, 0, 0, 0.18)" }}
>
{/* ── Sticky header ── */}
<div className="shrink-0 px-6 pt-7">
<div className="shrink-0 px-6 pt-7" data-loop-panel-drag>
<SearchHeader
variant={isSearchMode ? "search" : "main"}
activeTab={activeTab}
Expand All @@ -109,7 +112,10 @@ export default function App({
{/* ── Main content: search uses pinned footer CTA; other views scroll with CTA inline ── */}
{view === "search" ? (
<div className="flex min-h-0 flex-1 flex-col">
<div className="min-h-0 flex-1 overflow-y-auto px-6 py-[21px]">
<div
className="min-h-0 flex-1 overflow-y-auto px-6 py-[21px]"
data-loop-scroll
>
<SearchView
query={searchQuery}
onSearchSelect={handleSearchSelect}
Expand Down Expand Up @@ -137,7 +143,10 @@ export default function App({
</div>
</div>
) : (
<div className="min-h-0 flex-1 overflow-y-auto px-6 py-[21px]">
<div
className="min-h-0 flex-1 overflow-y-auto px-6 py-[21px]"
data-loop-scroll
>
{view === "feed" && (
<FeedView
bookmarkedIds={bookmarkedIds}
Expand Down
12 changes: 10 additions & 2 deletions apps/extension/src/background.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
// No side panel logic needed — UI is injected via content script.
export {};
// When the user clicks the toolbar icon, tell the active tab's content script
// to re-show the floating panel (in case it was previously dismissed).
chrome.action.onClicked.addListener((tab) => {
if (tab.id === undefined) return;
void chrome.tabs
.sendMessage(tab.id, { type: "LOOP_SHOW_PANEL" })
.catch(() => {
// Content script not injected on this page — silently ignore.
});
});
Loading
Loading