38 Commits
Author SHA1 Message Date
wrt122311 982cfa8330 feat: add Pixiv artwork link button on images 2026-05-04 16:47:29 +08:00
wrt122311andClaude Sonnet 4.6 806353a791 fix: widen scrollbar to 12px for easier clicking
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:27:06 +08:00
wrt122311andClaude Sonnet 4.6 bc62a46174 feat: add custom draggable scrollbar on the right of image browse areas
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:23:55 +08:00
wrt122311andClaude Sonnet 4.6 3625b18ad5 fix: treat saved refresh token as logged-in on startup to skip login prompt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 09:00:19 +08:00
wrt122311andClaude Sonnet 4.6 7002003d99 fix: only cache first page to avoid expensive restoration on workflow switch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 08:56:40 +08:00
wrt122311andClaude Sonnet 4.6 ac94ad3ceb feat: cache tab data in module scope to prevent reload on workflow switch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 08:51:56 +08:00
wrt122311andClaude Sonnet 4.6 eccecfccd9 fix: reserve image space via aspect-ratio to eliminate layout shifts
Return width/height from API and set aspect-ratio on <img> so the
browser allocates the correct card height before the image loads.
This prevents masonryAdd from misplacing cards and stops flickering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.3.0
2026-04-25 14:34:36 +08:00
wrt122311andClaude Sonnet 4.6 ad32c14cdf feat: single-select by default, multi-select toggle button
Clicking a card now replaces the selection (single-select mode).
A "多选" button in the footer enables multi-select mode (original
behavior: toggle each card independently).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 14:26:20 +08:00
wrt122311andClaude Sonnet 4.6 cc84419a3c feat: add search tab and fix masonry layout gaps
- Add search pane with artwork/tag search and artist search, both with
  infinite scroll and tab caching
- Replace CSS columns masonry with JS shortest-column algorithm to
  eliminate gaps caused by column-fill:balance
- Add /pixiv/search/illusts and /pixiv/search/users API endpoints
- Search results: illusts use masonry grid, artists use list layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.2.0
2026-04-25 07:24:56 +08:00
wrt122311andClaude Sonnet 4.6 f7548518eb fix: remove all gaps between masonry cards
- column-gap: 0, margin-bottom: 0 → images are flush edge-to-edge
- Replace border with inset box-shadow for hover/selected (no layout cost)
- Remove grid-pane padding so grid fills the container fully

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 21:19:02 +08:00
wrt122311andClaude Sonnet 4.6 729b2a7d9f feat: masonry layout, instant selection commit
- Switch grid to CSS columns (masonry) so images show at natural aspect
  ratios packed edge-to-edge, no more forced square crop
- Remove '确认选择' button; every card click / deselect / clear now
  immediately writes to the artwork_ids widget via commitSelection()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 21:09:58 +08:00
wrt122311andClaude Sonnet 4.6 a841f17316 feat: bookmark toggle, artist view button, follow artist
- Bookmark button now toggles: ♥ click cancels bookmark via bookmark_delete API
- Add is_followed to user data in _fmt_illusts
- Add POST /pixiv/bookmark_delete and POST /pixiv/follow endpoints
- Add '↗' artist button on each card (hover): jumps to artists tab and
  loads that artist's works with name header + follow/已关注 badge
- Follow button in artist works header; replaces itself with 已关注 on success
- Artist works area restructured to flex-column for header + scrollable grid

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 21:00:49 +08:00
wrt122311andClaude Sonnet 4.6 85aa52acc3 feat: add bookmark button to image cards
- Include is_bookmarked in _fmt_illusts response
- Add POST /pixiv/bookmark endpoint (add-only, never removes)
- Show heart button on each card: filled pink if already bookmarked,
  hidden until hover if not; clicking only adds, never toggles off

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 20:49:50 +08:00
wrt122311andClaude Sonnet 4.6 17e2a96652 feat: cache all tabs DOM, add refresh button to each
All tabs (推荐/排行榜/收藏/画师) now cache their DOM node on switch-away
and restore it on switch-back without reloading. Each tab has a '↻ 刷新'
button that clears the cache and reloads on demand.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 20:26:57 +08:00
wrt122311andClaude Sonnet 4.6 ddc04688cb feat: cache recommended tab DOM, add refresh button
Switching away from recommended now saves the pane DOM node; switching
back restores it instantly without re-fetching. A '↻ 刷新' button in
the sub-bar clears the cache and reloads on demand.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 20:18:57 +08:00
wrt122311andClaude Sonnet 4.6 f1553d2eeb feat: add ranking mode selector (日榜/周榜/月榜 etc.)
Add a sub-toolbar in the ranking tab with 7 modes: day/week/month/
day_male/day_female/week_original/week_rookie. Clicking a mode clears
the grid and reloads with the new mode parameter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 20:12:58 +08:00
wrt122311andClaude Sonnet 4.6 0f1e087d64 fix: filter invalid kwargs from recommended next_url pagination
illust_recommended's next_url contains array params like "viewed[]"
which are invalid Python identifiers and crash **kwargs unpacking.
Filter to isidentifier() keys only so pagination works correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.1.0
2026-04-24 20:07:25 +08:00
wrt122311andClaude Sonnet 4.6 5327bf1adc fix: replace api.next_qs with stdlib URL parser for compatibility
pixivpy3 versions without next_qs method caused infinite scroll to fail.
Implement _next_qs() using urllib.parse as a drop-in replacement.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 13:09:57 +08:00
wrt122311andClaude Sonnet 4.6 e095d8f25d fix: use F.interpolate to resize tensors before stacking
Replace PIL-level conditional resize with PyTorch F.interpolate so that
shape comparison and resizing happen at the tensor level, fixing the
torch.stack size mismatch error when selecting images of different
resolutions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 13:07:23 +08:00
wrt122311andClaude Sonnet 4.6 cfa327b728 fix: replace IntersectionObserver with scroll event for infinite scroll
IntersectionObserver with root:pane is unreliable inside ComfyUI DOM
widgets. Replace with scroll event listeners on the pane element.
Also: auto-fill pane when initial batch doesn't cause overflow, and
abort stale async loads when tab/artist changes mid-flight.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 12:59:08 +08:00
wrt122311andClaude Sonnet 4.6 b19db544e8 feat: replace modal popup with inline node DOM widget
The browser UI is now embedded directly inside the ComfyUI node using
addDOMWidget. Each node instance gets its own independent state. All DOM
queries are scoped to the node container so multiple nodes work correctly.
Mouse/wheel events are stopped from propagating to the canvas.
Default node size 700x500; user can resize freely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 12:49:37 +08:00
wrt122311andClaude Sonnet 4.6 2c4c24531e fix: embed original URL in widget to eliminate serial illust_detail API calls
_fmt_illusts now includes original_url from browse data (meta_single_page /
meta_pages). The confirm button writes id|url pairs to the widget. The node
parses the pairs and downloads directly, removing N extra API calls that
were being rate-limited and silently failing for multi-image selections.
Falls back to get_original_url for legacy plain-ID widget values.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.0.0
2026-04-24 12:38:11 +08:00
wrt122311andClaude Sonnet 4.6 b26e9473f2 feat: add selected images panel and clear-all button
- New "已选" tab shows all selected images in a grid; each card has
  an X button (top-right) to remove that image from the selection
- "清除全部" button in header clears all selections at once
- illustCache persists illust thumbnails across modal opens so the
  panel can display images selected in previous sessions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 12:28:54 +08:00
wrt122311andClaude Sonnet 4.6 96bcf56cea fix: resize images to uniform size before stacking into batch tensor
Multiple selected artworks can have different resolutions; torch.stack
requires equal shapes. Resize all to the first image's dimensions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 12:23:37 +08:00
wrt122311andClaude Sonnet 4.6 26d4fc9c10 fix: use iOS app User-Agent for image downloads
Pixiv CDN blocks python-requests default UA with 403. Using the same
PixivIOSApp UA as the mobile API client passes CDN checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:52:50 +08:00
wrt122311andClaude Sonnet 4.6 2ed41ce01f fix: handle access token expiry and surface download errors
- Track auth time; re-auth after 55 min so node execution doesn't hit
  expired access tokens (1-hour TTL)
- Use API's additional_headers in download_image_bytes for consistency
- Collect per-image error messages and include them in the ValueError
  so the ComfyUI error dialog shows the actual failure reason

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:47:47 +08:00
wrt122311andClaude Sonnet 4.6 de9a907219 docs: update README with two-tab login instructions
Document Refresh Token (gppt) as recommended login method and OAuth
as fallback. Add FAQ entry for pixiv:// URL not appearing issue.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:32:27 +08:00
wrt122311andClaude Sonnet 4.6 8cdedc815f fix: add refresh token direct login, two-tab login UI
Add POST /pixiv/auth/set_token endpoint for direct refresh_token auth.
Redesign login page with two tabs: recommended gppt token flow and
fallback OAuth flow with pixiv:// URL validation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:27:19 +08:00
wrt122311 e5659f96aa fix: login UI - fix CSS display bug, clearer step instructions, validate pixiv:// URL 2026-04-24 08:19:48 +08:00
wrt122311 c5311068bc docs: add README with usage guide and example workflows 2026-04-24 08:06:45 +08:00
wrt122311 1e356c0f91 feat: modal CSS and JS extension (login, browser, artist tab) 2026-04-24 07:41:55 +08:00
wrt122311 99d0722c25 feat: API routes and node registration 2026-04-24 07:40:33 +08:00
wrt122311 1805b032b4 feat: PixivBrowser node execute() 2026-04-24 07:40:08 +08:00
wrt122311 f33e36a1b8 feat: pixiv_client auth, fetch and download methods 2026-04-24 07:39:43 +08:00
wrt122311 bde40e83a1 feat: config token persistence 2026-04-24 07:38:54 +08:00
wrt122311 145f6bf204 feat: project scaffold 2026-04-24 07:38:40 +08:00
wrt122311 243c37a903 feat: add implementation plan 2026-04-24 07:29:32 +08:00
wrt122311 45b1aa50d0 Add Pixiv ComfyUI node design spec 2026-04-24 07:20:16 +08:00