Cesar CastilloThis is a submission for the GitHub Copilot CLI Challenge Author: Cesar Castillo Repository:...
This is a submission for the GitHub Copilot CLI Challenge
Author: Cesar Castillo
Repository: https://github.com/CGCM070/NotebookLM_Enhancer
A Chrome extension that transforms NotebookLM's chaotic sidebar into a beautifully organized folder system, because 47 research notes shouldn't look like a pile of digital laundry.
If you've used NotebookLM, you know it's magical for research. Upload PDFs, paste URLs, ask questions it's like having a research assistant that never sleeps.
But there's one maddening catch: the sidebar becomes a nightmare when you have more than 10 notes.
Imagine:
No folders. No organization. Just... chaos.
I built a Chrome extension that injects a complete folder management system directly into NotebookLM's sidebar.
ποΈ Smart Folder Organization
π§βπ¨ Polished UI That Matches NotebookLM
πInternationalization
πIntelligent Integrations
Robust Architecture
This isn't a simple content script that adds a few buttons. It's a full micro-frontend architecture:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NotebookLM Page β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Native Sidebar (hidden but functional) β β
β β β’ Still handles clicks & menus β β
β β β’ We extract data from it β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Our Injected Host (Shadow DOM) β β
β β βββββββββββββββββββββββββββββββββββββββββββββ β β
β β β Iframe (Angular App) β β β
β β β β’ Folder tree β β β
β β β β’ Drag & drop (Angular CDK) β β β
β β β β’ Theme toggle β β β
β β β β’ Note add. folder add... β β β
β β β β’ i18n β β β
β β βββββββββββββββββββββββββββββββββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Why an iframe inside Shadow DOM?
Communication Flow:
1. Storage V3 with Notebook Isolation
Instead of one global folder structure, each NotebookLM project gets its own isolated state:
// StorageStateV3
{
byNotebook: {
"uuid-abc-123": {
folders: [...],
notebookFolderByKey: {...}
},
"uuid-def-456": {
folders: [...],
notebookFolderByKey: {...}
}
}
}
This means your "Work" folder structure doesn't leak into your "Personal" research. Clean separation.
2. Handling MV3 Service Worker Sleep
Chrome MV3 Service Workers sleep after 30 seconds of inactivity. This breaks chrome.runtime calls.
Instead of fighting it with "keep-alive" hacks, we:
NLE.log() instead of spamming console.warn3. Native Drag Bridge
Making the native NotebookLM sidebar items draggable was tricky. We:
dragstart on native itemselementFromPoint() with coordinates4. Auto-Focus Input in Modals
Small UX detail that makes a huge difference:
After:
Export your notes :
Drag & Drop:
Full video
This project was built almost entirely through GitHub Copilot CLI interactions turning natural language into production-ready code.
1. Architecture Decisions
# Asked Copilot: "Best way to inject UI into an existing Angular Material page?"
# Copilot suggested: Shadow DOM + iframe for isolation
# Result: Zero style conflicts with NotebookLM's Material Design
2. Content Script Structure
# Asked: "How to structure 8 content scripts that share state?"
# Copilot proposed: Module pattern with window.__NLE__ namespace
# Result: Clean separation, no global pollution
3. Drag & Drop Implementation
# Asked: "Bridge native HTML5 drag with Angular CDK drop?"
# Copilot designed: Overlay system with coordinate translation
# Result: Seamless drag from native sidebar to our folders
4. Debugging Context Invalidation
# Asked: "Chrome MV3 extension context invalidated errors?"
# Copilot implemented: Graceful detection + silent retry logic
# Result: No console spam, smooth recovery
5. i18n System
# Asked: "Lightweight i18n without ngx-translate bloat?"
# Copilot built: Custom TranslationService with lazy loading
# Result: ~3KB vs ~50KB, full interpolation support
Speed: What would have taken weeks took days. Complex features like the drag bridge were implemented in hours, not days.
Architecture: Copilot suggested patterns I wouldn't have considered (like the iframe-in-shadow approach) that solved isolation problems elegantly.
Edge Cases: MV3 quirks, Material Design menu positioning, SPA navigation detection Copilot handled these gracefully.
Learning: Every interaction was a learning moment :) . I now understand Chrome Extension architecture, Angular standalone components, and Tailwind customization.
π€ Open Source
This project will be open-sourced. Want to contribute?
Built with β€οΈ, and a lot of help from GitHub Copilot CLI.
devchallenge
githubchallenge
cli
githubcopilot