Commit Graph

23 Commits

Author SHA1 Message Date
Saberlve
55edb5522a fix: restructure .window-body to single column so import-actions spans full width
The import-actions div was a sibling of import-split in a 2-column grid,
causing it to only occupy the right 60% column. Changed .window-body to
a 2-row single-column grid so import-actions sits below import-split
spanning the full width.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 21:01:55 +08:00
Saberlve
c6e1d20c68 fix: XSS vulnerabilities and error handling in import window
- Escape creators, year, item_type fields in renderImportItemList and
  showItemPreview (was only escaping title and abstract)
- loadImportState uses api() wrapper for proper error handling
- generateSelectedCards uses api() wrapper with try/catch
- Remove duplicate isImportWindowOpen in state object

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 20:34:42 +08:00
Saberlve
aae8a6340a feat: add two-column import window layout with batch generate
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 20:28:16 +08:00
Saberlve
4350f9b3a1 feat: add POST /api/projects/{id}/cards/generate endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 20:08:14 +08:00
Saberlve
9ba1668a66 refactor: import_item_keys no longer generates cards immediately
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 19:36:00 +08:00
Saberlve
1f7cbc7d10 fix: add missing projects.py to worktree
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 19:03:36 +08:00
Saberlve
63de030789 feat: add GET /api/projects/{id}/import-state endpoint
Returns pending/done status for each item in a project by checking
selected-items.json against cards.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 18:44:43 +08:00
Saberlve
b955d382e3 fix: add missing cancelAbstractPreview function and related state
The openImportWindow and closeImportWindow functions referenced
cancelAbstractPreview which was not defined. Added:
- hoverTimerId, hoveredItemKey, previewItemKey to state
- previewPopover to elements object
- cancelAbstractPreview function

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 16:33:41 +08:00
Saberlve
d624315fbf fix(import-window): move window shell outside layout to fix z-index stacking
The window-shell was incorrectly placed inside the first .panel section.
.panel creates a stacking context via backdrop-filter/overflow, trapping
the position:fixed window frame. Moving window-shell and minimized-bar
to be direct children of <body> (outside <main class="layout">) so
z-index:40 properly covers all panels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 16:21:53 +08:00
Saberlve
947cef19ec feat(import-window): implement drag, minimize, maximize, close + rename refs
- Add window management functions: applyWindowPositionAndSize,
  initWindowFromSession, startWindowDrag, moveWindowDrag, endWindowDrag,
  minimizeWindow, maximizeWindow, restoreWindow
- Wire window control button event listeners
- Rename openImportModal→openImportWindow, closeImportModal→closeImportWindow
- Update all element references from modal*→window* names
- Remove selectDescendantsButton references
- openImportWindow now calls initWindowFromSession on open

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 15:58:45 +08:00
Saberlve
35d1db4fd7 feat(import-window): add window state management to JS
Adds WINDOW_SESSION_STORAGE_KEY, readWindowSessionState(),
window state properties to state object, new element references
in elements object, and persistWindowSessionState().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 15:53:51 +08:00
Saberlve
998551ab19 feat(import-window): replace modal CSS with window frame CSS
Replaces .modal-shell, .modal-overlay, .modal-card with
.window-shell, .window-frame supporting:
- 90vw x 75vh centered floating window
- minimize/maximize/close buttons
- draggable toolbar
- resizable window
- session-persisted position/size

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 15:52:33 +08:00
Saberlve
803cccfbd1 feat(import-window): replace modal HTML with window frame structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 15:43:28 +08:00
Saberlve
3667e313a4 refactor: derive modal project label from canonical state 2026-04-15 12:54:27 +08:00
Saberlve
00106e11d5 fix: reset modal load state after fetch errors 2026-04-15 12:54:27 +08:00
Saberlve
3a1c046a68 fix: sequence modal collection item loads 2026-04-15 12:54:27 +08:00
Saberlve
4b6c78105e fix: validate modal session state 2026-04-15 12:54:27 +08:00
Saberlve
a117a29b0d fix: keep modal rows compact and label project by name 2026-04-15 12:54:27 +08:00
Saberlve
ec32d591df feat: wire modal import state 2026-04-15 12:54:27 +08:00
Saberlve
d52a52b574 fix: add minimal zotero modal lifecycle 2026-04-15 12:22:49 +08:00
Saberlve
0e62d0fc4e fix: simplify zotero import modal shell 2026-04-15 12:21:17 +08:00
Saberlve
4db4632ac8 fix: trim zotero import modal shell 2026-04-15 12:18:34 +08:00
Saberlve
6a2250ef1a feat: add zotero import modal shell 2026-04-15 12:16:31 +08:00