Commit Graph

201 Commits

Author SHA1 Message Date
Estrella Pan
c0480fe028 feat(search): redesign search panel with chip cloud filters
- Add filter section with group, resolution, subtitle, season categories
- Implement multi-select filters with smart disabling for incompatible options
- Display result variant tags as non-clickable colored pills
- Unify tag styling (pill shape, 12px font) across filters and results
- Add expand/collapse for filter categories and variant overflow
- Normalize tag values (resolution: FHD/HD/4K, subtitle: 简/繁/双语)
- Calculate poster height to match 4 rows of variant chips (168px)
- Add click-outside-to-close for modal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:59:28 +01:00
Estrella Pan
27a056d01a fix(login): unify input height and font size with buttons
Standardize form element dimensions for visual consistency:
- Input height: 48px → 44px (matches button height)
- Input font: 16px → 14px (consistent with form elements)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:14:38 +01:00
Estrella Pan
5ab38c335d refactor(setup): remove syncMediaPath call from downloader step
Path is now synced directly through downloaderData.path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:12:05 +01:00
Estrella Pan
2fb82a5a27 refactor(setup): remove redundant media library step from wizard
The media library path is now taken directly from the downloader path
field, eliminating the unnecessary separate step.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:11:44 +01:00
Estrella Pan
4488a89391 fix(player): normalize URLs without protocol to prevent relative path redirects
URLs entered without http:// or https:// were being treated as relative
paths by the browser. Added normalizeUrl() function that prepends http://
when no protocol is present.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:11:40 +01:00
Estrella Pan
8d09b0cecc fix(i18n): add missing translations for selectAll and theme toggle
- Add common.selectAll and common.items translations
- Add theme.light and theme.dark translations
- Update ab-mobile-nav to use i18n for theme toggle label
- Remove hardcoded fallback in ab-data-list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 19:51:43 +01:00
EstrellaXD
f22f5c657f fix(test): correct TypeScript types in frontend test mocks
- Use RSS type instead of non-existent RSSItem/RSSResponse
- Add expire field to mockLoginSuccess
- Replace offset with episode_offset/season_offset in mockBangumiAPI
- Add needs_review_reason field to mockBangumiAPI
- Add missing RSS fields (connection_status, last_checked_at, last_error)
- Fix generic types in test utilities

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:24:31 +01:00
EstrellaXD
a137b54b85 test: add comprehensive API tests for backend and frontend
Backend:
- Add API test files for auth, program, downloader, config, log, bangumi extended, search, and passkey endpoints
- Update conftest.py with new fixtures (app, authed_client, unauthed_client, mock_program, mock_webauthn, mock_download_client)
- Update factories.py with make_config and make_passkey functions

Frontend:
- Setup vitest testing infrastructure with happy-dom environment
- Add test setup file with mocks for axios, router, i18n, localStorage
- Add mock API data for testing
- Add tests for API logic, store logic, hooks, and basic components
- Add @vue/test-utils and happy-dom dev dependencies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:20:39 +01:00
EstrellaXD
0ba508cd0b fix(webui): prevent empty search and cancel search on modal close
- Add input validation to prevent search when keyword is empty or whitespace
- Close EventSource connection when search modal is closed to stop ongoing searches

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:42:40 +01:00
EstrellaXD
bb8adf6813 fix(webui): fix iOS Safari input zoom and keyboard issues
- Add global CSS rule to prevent auto-zoom on input focus by ensuring
  font-size >= 16px on touch devices
- Update bottom sheet to use dvh units and visualViewport API for
  proper keyboard handling on iOS Safari
- Update modal components (ab-add-rss, ab-search-modal) to use dvh
  units with vh fallback for older browsers
- Add scroll-margin-bottom for inputs in bottom sheets

Closes #959

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:15:07 +01:00
EstrellaXD
f2f00a9f82 fix(passkey): allow no-username passkey login with discoverable credentials
Remove the username requirement check that was blocking passkey login without
entering a username. The backend already supports discoverable credentials mode.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 13:22:57 +01:00
Estrella Pan
f764279a51 fix(webui): improve mobile UI/UX layout and responsiveness
Mobile Layout Fixes:
- Fix config page horizontal overflow by adding min-width: 0 constraints
- Fix sticky action buttons positioning on config page
- Add loading states to config save/cancel buttons
- Reduce topbar padding and icon spacing for mobile
- Make search button fill space between logo and action icons
- Fix search modal header layout with close button visibility

Component Improvements:
- ab-topbar: Flex search button with "Click to search" text on mobile
- ab-status-bar: Reduce button sizes and gaps on mobile
- ab-fold-panel: Add max-width and overflow constraints
- ab-setting: Add max-width: 100% to prevent input overflow
- ab-search-modal: Reduce padding and element sizes on mobile
- ab-mobile-nav: Increase label font-size from 10px to 11px
- ab-sidebar: Fix toggle animation (rotateY → rotate)

Calendar & Bangumi Pages:
- Add lazy loading to poster images for better performance
- Move unknown air day items to separate section below grid
- Add actionable CTA button to empty state with useAddRss hook

Login Page:
- Add will-change: transform for background animation performance

i18n:
- Add click_to_search translation key for mobile search button
- Add add_rss_btn translation for empty state CTA

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 23:09:53 +01:00
Estrella Pan
a0a21a71e5 feat(webui): add search provider settings panel
- Add config-search-provider.vue component for managing search sources
- Support CRUD operations for custom search providers
- Default providers (mikan, nyaa, dmhy) cannot be deleted
- URL template validation ensures %s placeholder is present
- Add backend API endpoints GET/PUT /search/provider/config
- Add i18n translations for zh-CN and en

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:27:33 +01:00
Estrella Pan
5e0efc01b9 fix(webui): use episode_offset instead of offset in components
The BangumiRule type uses episode_offset but components were using offset,
causing TypeScript errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:16:54 +01:00
Estrella Pan
66c7127f21 feat(offset): add automatic season/episode offset detection
- Add offset detector to identify season mismatches between RSS and TMDB
- Only suggest season_offset (user sets episode_offset manually)
- Add background scanner for existing bangumi rules
- Add detect-offset and dismiss-review API endpoints
- Add warning banner in edit dialog with auto-detect button
- Add iOS-style notification badge for needs_review items
- Yellow badge with "!" for warnings, purple badge for multi-rule count
- Combined badge shows "! | 2" when both conditions apply
- Yellow glow animation on cards needing review
- Highlight warning items in rule selection popup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 21:03:18 +01:00
Estrella Pan
c044b65fef chore: bump version to 3.2.0-beta.9
Fix TypeScript error in ab-search-bar.vue and include pending changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 19:29:12 +01:00
Estrella Pan
22870b8ae3 feat(auth): support usernameless passkey login (discoverable credentials)
- Change resident key requirement from PREFERRED to REQUIRED during registration
- Add discoverable authentication options (empty allowCredentials)
- Add verify_discoverable_authentication method in WebAuthn service
- Update auth strategy to lookup user from credential when username not provided
- Make username optional in frontend passkey login flow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 19:23:39 +01:00
Estrella Pan
9e6a528e57 fix(search): resolve multiple issues in search and subscription flow
- Fix axios interceptor error when response.data is undefined by adding
  optional chaining (?.msg_en, ?.msg_zh)
- Fix XML parsing crash in backend by catching ParseError exceptions
- Remove brotli (br) from Accept-Encoding header to fix mikan RSS fetch
  issues (httpx doesn't auto-decompress brotli)
- Fix search card click event not triggering confirmation modal by
  changing from native 'click' to custom 'select' event with typed payload
- Add NMessageProvider to App.vue to fix useMessage() outside setup error
- Replace structuredClone with JSON.parse/stringify in confirm modal
  to handle Vue reactive Proxy objects

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:33:46 +01:00
Estrella Pan
362c7b81ca feat(ui): redesign search panel with modal and filter system
- Replace dropdown search results with full-screen modal
- Add 4-tier filter chips: subtitle group, resolution, subtitle type, season
- Auto-extract filter options from search results
- Add confirmation modal before subscribing
- Support toggle close (click search input, Escape, or X button)
- Responsive grid layout: 1-4 columns based on viewport
- SSE streaming with fade-in card animations
- Add i18n translations for search filters and confirmation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 11:48:32 +01:00
Estrella Pan
2031836b2e feat(ui): redesign login panel with modern glassmorphism style
- Add animated gradient background with floating blobs
- Use glassmorphism card with backdrop blur
- Add brand logo with theme-aware switching (light/dark)
- Improve form layout with input icons and better spacing
- Make login button full-width for better UX
- Add loading state for login button
- Improve passkey button styling with dashed border
- Respect prefers-reduced-motion for animations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 11:09:02 +01:00
Estrella Pan
9dd65cc28e fix(ui): widen unknown column in calendar layout
Make the "unknown" day column span 2 grid columns and display
items in a grid layout for better use of space.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 11:08:53 +01:00
Estrella Pan
ef45681ce3 feat(ui): add log level filter in log view
Allow filtering logs by level (INFO, WARNING, ERROR, DEBUG) with
color-coded filter chips. Multiple levels can be selected simultaneously.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:43:43 +01:00
Estrella Pan
609aa9b505 fix(ui): unify action bar button sizes in downloader page
Add size="small" to Resume, Pause, and Delete buttons in the
torrent action bar for consistent button heights.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:57:40 +01:00
Estrella Pan
9ae643e40e fix(ui): show anime name with season in downloader page
When save_path ends with a season-only folder (Season 1, S01, 第1季),
display "Anime Name / Season 1" instead of just "Season 1"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:47:50 +01:00
Estrella Pan
c9724179fb fix(ui): improve edit rule dialog layout and button consistency
- Increase dialog width from 380px to 460px to fit all content
- Unify button heights across ab-button and ab-button-multi components
  - small: 32px, normal: 36px, big: 44px
- Restructure ab-rule form layout with consistent gap spacing
- Fix Episode Offset row to keep input and button on same line (mobile)
- Add proper z-index layering for ab-bottom-sheet (backdrop: 100, container: 101, panel: 102)
- Add scoped styles for ab-setting dynamic-tags wrapper
- Add action button separator line in edit dialog

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:46:21 +01:00
Estrella Pan
ecd7914f22 fix(db): prevent duplicate bangumi rules in add_all method
- Add _is_duplicate() helper to check by (title_raw, group_name)
- Fix add_all() to skip existing records and deduplicate within batch
- Improve add() to use same deduplication logic

feat(ui): calendar page grouping and accessibility improvements

- Calendar page now groups bangumi by title+season (same as main page)
- Add rule selection popup for grouped bangumi with multiple rules
- Add skeleton loading animation on bangumi list page
- Fix popup z-index layering with CSS variable system
- Improve accessibility: 44px touch targets, focus-visible states, aria-labels
- Add i18n translations for rule selection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:38:16 +01:00
Estrella Pan
ab62a52e81 fix(ui): improve mobile layout and badge styling
- Hide page title on mobile for cleaner layout
- Change group badge color to purple (primary color)
- Fix badge positioning at card corners with fit-content wrapper
- Increase grid padding to prevent badge clipping
- Center grid items for better alignment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:20:49 +01:00
Estrella Pan
55b15ea8fe feat: add bangumi archive and episode offset features (#958)
* feat: add bangumi archive and episode offset features

Archive Feature:
- Add archived field to Bangumi model with database migration (v4)
- Add archive/unarchive API endpoints (PATCH /bangumi/archive/{id})
- Add auto-archive for ended series via TMDB metadata refresh
- Add collapsible archived section in UI with visual styling
- Add archive/unarchive button in edit rule popup

Episode Offset Feature:
- Extract series_status and season_episode_counts from TMDB API
- Add suggest-offset API endpoint with auto-detection logic
- Apply offset in renamer gen_path() for episode numbering
- Add offset field with "Auto Detect" button in rule editor
- Look up offset from database when renaming files

The offset auto-detection calculates the sum of episodes from all
previous seasons (e.g., if S01 has 13 episodes, S02E18 → S02E05
with offset=-13).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: add changelog for bangumi archive and episode offset features

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:13:49 +01:00
Estrella Pan
c5f4919e15 feat(rss): add connection status tracking and display
Track RSS feed reachability during refresh cycles. Each feed now stores
connection_status (healthy/error), last_checked_at, and last_error.
The RSS management page shows a green "Connected" tag for healthy feeds
and a red "Error" tag with tooltip for failed feeds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 21:45:04 +01:00
Estrella Pan
cba4988e52 perf: comprehensive performance optimization for backend and frontend
Backend: shared HTTP connection pool, concurrent RSS/torrent/notification
operations, TMDB/Mikan result caching, database indexes, pre-compiled
regex, __slots__ on dataclasses, O(1) set-based dedup, frozenset lookups,
batch RSS enable/disable, asyncio.to_thread for blocking calls.

Frontend: shallowRef for large arrays, computed table columns, watch
instead of watchEffect, scoped style fix, typed emits, noImplicitAny,
useIntervalFn lifecycle management, shared useClipboard instance,
shallow clone for shared template objects.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 20:46:45 +01:00
Estrella Pan
8694434269 fix(webui): destructure non-reactive steps from setup store directly
`steps` is a plain array in the store, not a ref. Using `storeToRefs`
returned undefined, causing "Cannot read properties of undefined
(reading 'length')" at runtime.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 08:22:54 +01:00
Estrella Pan
5382aec8dc feat: add first-run setup wizard with guided configuration
Add a multi-step setup wizard that guides new users through initial
configuration on first run. The wizard covers account credentials,
download client connection (with test), RSS source, media paths,
and optional notification setup.

Backend: new /api/v1/setup/ endpoints with sentinel file mechanism.
Frontend: 7-step wizard with validation and i18n (en/zh-CN).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 08:16:41 +01:00
Estrella Pan
3ff0a64e89 feat(webui): mobile-first responsive redesign with 3-tier breakpoints
Implement a comprehensive mobile-first UI redesign with touch-friendly
navigation, responsive data display, and proper device adaptation.

Key changes:
- Add 3-tier breakpoint system: mobile (<640px), tablet (640-1023px), desktop (1024px+)
- Create core mobile components: bottom-sheet, pull-refresh, swipe-container, data-list, adaptive-modal
- Redesign navigation: bottom nav with labels on mobile, mini sidebar on tablet
- Mobile-first layout with dvh units, safe area insets, and column-reverse flex
- Forms stack labels vertically on mobile, inputs go full-width
- Popups render as bottom sheets on mobile devices
- Bangumi grid uses CSS Grid with responsive minmax columns
- RSS page uses card-based data-list on mobile instead of NDataTable
- Config actions get safe area padding and full-width buttons on mobile/tablet
- Touch targets enforced at 44px minimum throughout
- Add sheet/overlay/swipe CSS transitions
- Topbar search visible on tablet (previously desktop-only)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 07:37:50 +01:00
Estrella Pan
2a3a53449c feat(webui): redesign LLM settings section
- Rename "Experimental Setting" to "LLM Settings" with cleaner labels
- Replace jarring yellow warning banner with subtle themed notice
- Only show config fields when LLM is enabled (slide-fade transition)
- Add gpt-4o and gpt-4o-mini to model options
- Use scoped CSS instead of UnoCSS utility classes for the section
- Update i18n labels for both en and zh-CN

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:26:06 +01:00
Estrella Pan
a98a162500 feat: fix search, poster serving, and add hover overlay UI for cards
- Fix search store exports to match component expectations (inputValue,
  bangumiList, onSearch) and transform data to SearchResult format
- Fix poster endpoint path check that incorrectly blocked all requests
- Add resolvePosterUrl utility to handle both external URLs and local paths
- Move tags into hover overlay on homepage cards and calendar cards
- Show title and tags on poster hover with dark semi-transparent styling
- Add downloader API, store, and page
- Update backend to async patterns and uv migration changes
- Remove .claude/settings.local.json from tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:20:12 +01:00
EstrellaXD
5a1a1ccfcf feat(webui): update settings, downloader, player, and log page styles
Restyle config components (ab-container, ab-fold-panel, ab-label,
ab-setting) and all config-* setting panels to use the new design
system. Add empty state guides with setup steps for downloader and
player pages. Simplify log page layout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:52:13 +01:00
EstrellaXD
2a757e8f2c feat: add calendar view with Bangumi.tv schedule integration
Add weekly broadcast schedule page showing subscribed anime grouped by
day-of-week. Backend fetches air_weekday from Bangumi.tv calendar API
and matches titles. Frontend displays responsive grid (desktop) and
vertical list (mobile). Edit popup moved to parent layout to fix
KeepAlive conflicts, and restyled with purple theme.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:51:19 +01:00
EstrellaXD
29e4c16b40 fix(webui): improve passkey UI and error handling
- Add secondary button type to ab-button with proper styling
- Fix small button sizing (min-width instead of fixed width)
- Add btn-content wrapper for icon+text alignment in buttons
- Add config-passkey panel to settings page
- Improve WebAuthn error messages with DOMException handling
- Prevent duplicate error messages from axios interceptor
- Fix Vite proxy to preserve Origin header for WebAuthn

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:49:42 +01:00
EstrellaXD
41397bd676 Merge branch 'feature/passkey-login' into feature/ui-redesign
# Conflicts:
#	webui/src/components/ab-bangumi-card.vue
#	webui/src/components/ab-container.vue
#	webui/src/components/ab-fold-panel.vue
#	webui/src/components/ab-search-bar.vue
#	webui/src/components/basic/ab-search.vue
#	webui/src/components/basic/ab-tag.vue
#	webui/src/components/layout/ab-topbar.vue
#	webui/src/pages/index.vue
#	webui/src/pages/index/bangumi.vue
#	webui/src/pages/index/config.vue
#	webui/src/pages/index/player.vue
#	webui/src/pages/login.vue
#	webui/types/dts/auto-imports.d.ts
#	webui/vite.config.ts
2026-01-23 15:08:16 +01:00
EstrellaXD
d2cfd9b150 feat: add WebAuthn passkey authentication support
- Add passkey login as alternative authentication method
- Support multiple passkeys per user with custom names
- Backend: WebAuthn service, auth strategy pattern, API endpoints
- Frontend: passkey management UI in settings, login option
- Fix: convert downloader check from sync requests to async httpx
  to prevent blocking the event loop when downloader unavailable

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:57:00 +01:00
EstrellaXD
72679cca59 feat(webui): complete UI redesign with design system, dark mode, and accessibility
Implement a comprehensive UI overhaul using CSS custom properties for theming,
scoped SCSS for all components and pages, dark/light mode toggle with flash
prevention, page transitions, ARIA accessibility attributes, and responsive
layout fixes. Fix VueUse auto-import configuration and dev proxy target.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:54:26 +01:00
Rewrite0
94329ae544 fix: #855 2024-09-24 19:08:50 +08:00
Rewrite0
8972373cb7 fix: vue-tsc error 2024-09-23 16:53:02 +08:00
Rewrite0
cee640d9af fix: type error 2024-09-23 16:38:02 +08:00
Rewrite0
ec2856bf5a refactor: refactor search logic & remove rxjs 2024-09-23 16:07:48 +08:00
Rewrite0
a2eb8d3537 fix: type error 2024-09-23 16:04:31 +08:00
Rewrite0
fcdcde07ed feat: update deps 2024-09-23 15:49:52 +08:00
Rewrite0
4e7bcd743a fix: type error 2024-09-23 12:37:54 +08:00
Rewrite0
9aadcfd122 feat: added mobile search styles 2024-09-23 11:55:50 +08:00
Rewrite0
5092c7f093 feat: optimize mobile Bangumi list styles 2024-09-23 11:55:50 +08:00