diff --git a/notes.html b/notes.html
new file mode 100644
index 0000000..da12dc8
--- /dev/null
+++ b/notes.html
@@ -0,0 +1,3407 @@
+
+
+
+
+
+ Prism Notes Legacy Workspace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ v1.0.0-alpha3
+
+
+
+
+
+
PB + Microsoft Graph
+
Sign in with Microsoft
+
+
+
+
Sign in with your Microsoft account
+
+
+
+
+
+
+
+
+
+
+
+
Notes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attachment Preview
+
+
+
+
+
+
+
+
No notes yet. Click New Note to create one.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
New Note
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
No attachments selected.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Hidden Notes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Conversations
+
+
+
+
+
+
+
+
+
+
No conversations yet. Click New Conversation to start one.
+
+
+
+
+
+
+
+
+
New Conversation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
No attachments selected.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/server.ts b/server.ts
index a1e4c82..96220b9 100644
--- a/server.ts
+++ b/server.ts
@@ -24,10 +24,6 @@ const ONENOTE_TARGET = {
notebookName: 'Billing Notes',
};
-const WORKSPACE_ROOT = new URL('./', import.meta.url).pathname;
-const LEGACY_NOTES_COMMIT = '4c6058c';
-let legacyNotesHtmlCache: string | null = null;
-
// ---------------------------------------------------------------------------
// App
// ---------------------------------------------------------------------------
@@ -62,42 +58,6 @@ function getBearerToken(header: string | undefined | null): string | null {
return m?.[1] || null;
}
-function decorateLegacyNotesHtml(html: string): string {
- const nav = `
- `;
-
- return html
- .replace('Prism Notes', 'Prism Notes Legacy')
- .replace(/]*)>/i, `${nav}`);
-}
-
-async function loadLegacyNotesHtml(): Promise {
- if (legacyNotesHtmlCache) return legacyNotesHtmlCache;
-
- const proc = Bun.spawn(['git', '--no-pager', 'show', `${LEGACY_NOTES_COMMIT}:index.html`], {
- cwd: WORKSPACE_ROOT,
- stdout: 'pipe',
- stderr: 'pipe',
- });
-
- const [stdout, stderr, exitCode] = await Promise.all([
- new Response(proc.stdout).text(),
- new Response(proc.stderr).text(),
- proc.exited,
- ]);
-
- if (exitCode !== 0) {
- throw new Error(stderr || `git show failed for ${LEGACY_NOTES_COMMIT}:index.html`);
- }
-
- legacyNotesHtmlCache = decorateLegacyNotesHtml(stdout);
- return legacyNotesHtmlCache;
-}
-
function escapeHtml(s: string): string {
return s
.replace(/&/g, '&')
@@ -1126,35 +1086,8 @@ app.get('/', async (c) => {
});
app.get('/notes', async (c) => {
- try {
- const html = await loadLegacyNotesHtml();
- return c.html(html);
- } catch (error) {
- console.error('Failed to load legacy notes UI', error);
- return c.html(`
-
-
-
-
- Prism Notes Legacy
-
-
-
-
-
-
Prism Notes
-
Legacy notes UI unavailable
-
The current server could not load the historical notes interface from git commit ${LEGACY_NOTES_COMMIT}.
-
${escapeHtml(String(error instanceof Error ? error.message : error || 'Unknown error'))}
-
-
-
-
-`, 500);
- }
+ const html = await Bun.file(new URL('./notes.html', import.meta.url)).text();
+ return c.html(html);
});
app.get('/tasks', async (c) => {