feat: rename keep-notes to memento-note, migrate to PostgreSQL, fix MCP bugs

- Rename directory keep-notes -> memento-note with all code references
- Prisma: SQLite -> PostgreSQL (both app and MCP server schemas)
- Sync MCP schema with main app (add missing fields, relations, indexes)
- Delete 17 SQLite migrations (clean slate for PostgreSQL)
- Remove SQLite dependencies (@libsql/client, better-sqlite3, etc.)
- Fix MCP server: hardcoded Windows DB paths -> DATABASE_URL env var
- Fix MCP server: .dockerignore excluded index-sse.js (SSE mode broken)
- MCP Dockerfile: node:20 -> node:22
- Docker Compose: add postgres service, remove SQLite volume
- Generate favicon.ico, icon-192.png, icon-512.png, apple-icon.png
- Update layout.tsx icons and manifest.json for PNG icons
- Update all .env files for PostgreSQL
- Rewrite README.md with updated sections
- Remove mcp-server/node_modules and prisma/client-generated from git tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Sepehr Ramezani
2026-04-20 20:58:04 +02:00
parent e2ddfa53d4
commit aa6a214f37
3548 changed files with 440 additions and 516800 deletions

View File

@@ -0,0 +1,60 @@
import { test, expect } from '@playwright/test';
test.describe('Note Resizing', () => {
test('should increase note height when changing size to Large', async ({ page }) => {
// Go to home page
await page.goto('/');
// Create a new note to ensure we have a clean slate
const notesInput = page.locator('input[placeholder="Take a note..."]');
// If text is localized, try selector
const mainInput = page.locator('.note-input-container, [data-testid="note-input"]');
// Just click anywhere that looks like the input bar
// Or assume the placeholder might be localized.
// Best to find by visual structure if possible, but placeholder is common.
// Let's stick to the existing notes check.
// Wait for at least one note card
const firstNote = page.locator('.note-card').first();
await firstNote.waitFor({ state: 'visible', timeout: 5000 });
// Get initial height
const initialBox = await firstNote.boundingBox();
if (!initialBox) throw new Error('Note card has no bounding box');
console.log(`Initial height: ${initialBox.height}`);
// Hover to show actions
await firstNote.hover();
// Click "More options" button (3 vertical dots)
// Use selector ensuring it's the one inside THIS note
const moreBtn = firstNote.locator('button:has(svg.lucide-more-vertical)');
await moreBtn.waitFor({ state: 'visible' });
await moreBtn.click();
// Click "Large" option
// It's the 3rd item in the second group usually.
// Or we can look for the maximize icon
const largeOption = page.locator('div[role="menuitem"]:has(svg.lucide-maximize-2)').last();
// The sizes are Small, Medium, Large. All use Maximize2 icon in the current code?
// Let's check NoteActions code.
// Yes: <Maximize2 className="h-4 w-4 mr-2" /> for all sizes.
// And they are rendered in order: Small, Medium, Large.
// So "Large" is the LAST one.
await largeOption.waitFor({ state: 'visible' });
await largeOption.click();
// Wait for update
await page.waitForTimeout(1000);
// Get new height
const newBox = await firstNote.boundingBox();
if (!newBox) throw new Error('Note card has no bounding box after resize');
console.log(`New height: ${newBox.height}`);
// Assert
expect(newBox.height).toBeGreaterThan(initialBox.height + 50);
});
});