Blazor Server components cannot access client-side localStorage, so
InquiryBrowserClient needs to get the access token from server-side
ITokenStore and manually add the Authorization header to requests.
This fixes 401 Unauthorized errors when InquiryList loads inquiry data.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Move MudTabs inside MudPaper always visible structure
- Only render MudTabs content (with data) after isLoading becomes false
- Add null/empty check in InquiryTable.OnParametersSet()
- Add error handling in InquiryList data loading
Previously, MudTabs would render before data loaded, causing child
InquiryTable components to mount with empty Inquiries list. After
data loaded, child components weren't re-rendered because Blazor
didn't detect parameter changes in that scenario.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Page may be already rendered when showLoading() is called (fast nav, cached state)
- Check .admin-page-hero / .admin-login-page immediately and hide if present
- Prevents stuck loading overlay on rapid navigation between pages
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- App.razor: loading overlay starts with `show` class (visible on cold load)
- admin-session.js: add showLoading()/hideLoading(); MutationObserver detects
.admin-page-hero / .admin-login-page instead of mud-element count threshold;
observer restarts on every navigation cycle via LocationChanged
- MainLayout.razor: subscribe to NavigationManager.LocationChanged →
call JS showLoading() on every route change; implements IDisposable
- InquiryList.razor: remove unused IInquiryRepository injection; load data
once (GetPagedAsync(1,200)) and pass IReadOnlyList to all six tab panels
- InquiryTable.razor: accept Inquiries parameter; filter synchronously in
OnParametersSet() — eliminates 6 redundant API calls per page visit
- admin.css: overlay fade-in animation (0.15s); page content fade-in on
route mount via .admin-page-hero / .admin-login-page animation (0.25s)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
**Issue**: Loading indicator remained visible, intercepting all user interactions (pointer-events: auto blocks clicks)
**Root cause**: Multiple detection methods insufficient, race condition between JavaScript execution and Blazor initialization
**Solution**: Add guaranteed 3-second timeout + multiple detection methods
- Method 1: 3000ms timeout (guaranteed)
- Method 2: Detect when 10+ MudBlazor components appear
- Method 3: Hide when readystatechange to 'interactive' or 'complete'
**Failsafe**: Even if Blazor never fires events, loading WILL hide after 3 seconds max
**Result**:
- Loading shows: immediate on page load
- Loading hides: within 1-3 seconds (whichever is first)
- User can interact: guaranteed by 3-second timeout at latest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Issue**: Loading indicator (spinner) continues to display even after page fully loads
**Root cause**:
- Blazor.start() was already called by blazor.web.js (auto-starts)
- Calling it again in JavaScript won't trigger promise resolution
- Promise callback never executed, overlay never hidden
**Solution**: Use multiple detection methods to ensure loading hides:
1. Blazor 'ready' event listener (when circuit is ready)
2. DOMContentLoaded + 500ms timeout (fallback)
3. MutationObserver watching for 20+ MudBlazor components
**Result**:
- Loading spinner shows: page load starts
- Spinner hides: when ANY of the above conditions met (whichever is first)
- No more stuck loading indicator
This ensures loading always hides regardless of how Blazor initializes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Issue**: White screen appears 1-2 seconds during page load/transitions while Blazor circuit connects
**Solution**: Add loading spinner overlay that displays while Blazor initializes
**Changes**:
1. App.razor: Add loading overlay HTML element
2. admin.css: Add loading spinner styles + animations
3. admin-session.js: Show overlay on load, hide when Blazor circuit ready
**UX Flow**:
- Page load starts → Blazor loading spinner appears
- Blazor circuit connects (~1-2s) → Spinner disappears
- Page fully interactive → User sees content
**Styling**:
- Centered spinner with 'Loading...' text
- Semi-transparent background (blur effect)
- Smooth fade-out when complete
- High z-index (9999) to cover all content
This provides clear visual feedback that the app is working, not frozen.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Issue**: White screen still appears during page navigation even with prerender: true
**Root cause**: Blazor components (MudGrid, MudPaper, etc.) and their children don't fully render during prerendering phase. Only parent shells render, leaving empty containers.
**Solution**:
- prerender: true → false (App.razor Routes component)
- Pure interactive server rendering (no static prerendering)
- Blazor handles loading state automatically
**UX Result**:
- First page load: Brief loading indicator while Blazor circuit connects (~1-2s)
- Page navigation: Same loading indicator (consistent experience)
- No partial content flashing (no empty containers)
- All Blazor components fully interactive from initial render
This is the correct pattern for Blazor Server apps with complex component trees.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Issue**: Pages show white screen briefly before rendering when navigating between pages
**Root cause**: prerender: false in Routes component meant pages weren't statically prerendered before Blazor interactive mode connected, causing delay
**Fix**:
- Changed prerender: false → prerender: true
- Added explicit MudDialogProvider and MudSnackbarProvider for prerendering support
**Result**: Pages now render immediately with initial HTML, Blazor interactivity attached after - no white screen flash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wrap the page header section in MudContainer to ensure proper MudBlazor component hierarchy and rendering.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Issue**: Settings 페이지가 흰 화면으로만 표시됨
**Root cause**: MudGrid 내 MudPaper 요소들의 들여쓰기 누락으로 인한 HTML 구조 손상
- Line 22: MudPaper이 MudItem 없이 렌더링
- Line 50: 동일한 구조 오류
**Fix**: 모든 요소를 올바르게 들여쓰기
- MudPaper > MudForm > MudTextField 계층 정렬
- 모든 자식 요소 2칸 들여쓰기
**Result**: Settings 페이지가 정상 렌더링되고 폼 필드 표시됨
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Enhancement:**
- Wrap login form in HTML <form> element with @onsubmit
- HTML form automatically treats Enter key as submit action
- No need for custom @onkeypress handler
**Behavior:**
- Users can now press Enter in password field to login
- Or click the login button (existing behavior maintained)
- Both methods trigger HandleLogin() async handler
This provides better UX for keyboard-first users.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Issues Fixed:**
1. ✅ Logout not working
- Created Logout.razor page (was missing)
- Properly calls AuthStateProvider.LogoutAsync()
- Redirects to login page with forceLoad: true
- Button click now triggers async logout flow
2. ✅ Accordion state not persisting
- Changed MudNavGroup from fixed Expanded=true/false
- to @bind-Expanded data binding
- Now properly toggles between expanded/collapsed
- State persists across clicks
- Added expandedCustomerGroup, expandedWebsiteGroup properties
3. ✅ Drawer responsiveness
- Already working with @bind-open="@drawerOpen"
- ToggleDrawer() properly toggles state
- Responsive behavior controlled via Breakpoint.Md
**Implementation:**
- Logout.razor: New page for async logout
- Calls AuthStateProvider.LogoutAsync()
- Clears TokenStore + localStorage
- Redirects to /admin/login
- MainLayout.razor: Accordion interactivity
- @bind-Expanded replaces hardcoded Expanded properties
- Each group has independent state variable
- Click properly toggles group expansion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Issues Resolved:**
1. Access Token lifetime extended 15m → 1h (better UX)
- Users can browse admin pages for 1 hour without re-login
- Reasonable balance between security and usability
2. Automatic pre-expiry token refresh
- GetAuthenticationStateAsync() now checks if token expires in <5min
- Automatically refreshes before expiry when user is still active
- Prevents sudden logout during admin work
**Implementation:**
- Added ShouldRefreshToken() to detect imminent expiry (300s window)
- On auth state check, if token expiring soon: trigger refresh via AuthService
- Refresh happens transparently, no user interaction needed
- Maintains 7-day Refresh Token TTL for security
**Behavior:**
- User logs in with 1-hour session
- Every page load/navigation checks token status
- If <5min remaining: auto-refresh (user doesn't notice)
- If refresh fails: graceful logout with warning
- Refresh Token (7 days) allows re-login without password
This provides better UX while maintaining security through
shorter-lived access tokens and automatic renewal.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mobile S (<480px) drawer now properly:
- Uses flex-direction: row for horizontal layout
- Has max-height: 60px to constrain vertical space
- Shows horizontal scrollbar for nav items (overflow-x: auto)
- Proper border styling (no right border, bottom border)
- Brand mark positioned correctly with flex-shrink: 0
This fixes the drawer responsiveness test on 375px viewport.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
App.razor already provides MudThemeProvider globally.
Login.razor inheriting from BlankLayout should not redefine it.
This fixes the 'Duplicate MudPopoverProvider detected' error that was
preventing Blazor circuit from establishing and blocking login.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MudThemeProvider already includes Dialog and Snackbar providers.
Removing duplicates to fix 'Duplicate MudPopoverProvider detected' error.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Admin:PasswordResetToken configuration for secure password reset API
- Create V012 migration: Add test_admin account for E2E testing
- Create V013 migration: Ensure admin and test_admin accounts exist
- Use reset-password API endpoint instead of manual bcrypt hashing
- Test accounts now managed via API (not migrations/seeds)
Account setup:
- admin: Use reset-password API to set password
- test_admin: For E2E and Playwright testing
API Verification:
✅ POST /api/auth/login - test_admin login successful
✅ POST /api/auth/reset-password - Password reset working
✅ GET /api/inquiry - Returns 205 inquiries (test data)
✅ GET /api/faq - FAQ data accessible
✅ GET /api/admin/dashboard/summary - Dashboard API working
Data Note:
Local dev DB contains test data (205 inquiries from Playwright E2E tests).
Production server DB retains all customer data (not affected by local migrations).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously, all browser clients (AdminDashboardClient, InquiryBrowserClient, etc.)
had hardcoded BaseAddress of http://localhost:5001/taxbaik/api/. This caused
issues when implementing green-blue deployments where ports alternate between
5001/5002.
Changes:
- Add ApiClient:BaseUrl configuration in appsettings.json (default: 5001)
- Update Program.cs to read configuration instead of hardcoding
- All 6 browser clients now use dynamic configuration
- Deployment script prepared for green-blue support (port can be injected via
ApiClient__BaseUrl environment variable)
Deployment Note:
- For green-blue: Set ApiClient__BaseUrl environment variable before starting
the service on the alternate port (5002)
- Nginx still routes /taxbaik to the active instance
- Supports zero-downtime deployments
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Architecture Refactor (SOLID Principles):**
- Implement AdminDashboardController (REST API)
- Add dashboard summary endpoint
- Add upcoming filings endpoint
- Add recent inquiries endpoint
- Add monthly statistics endpoint
**Database Layer (Repository Pattern):**
- Extend IInquiryRepository with date range queries
- Implement CountByDateRangeAsync
- Implement CountByStatusAndDateAsync
- Extend InquiryRepository with new methods
**Service Layer (Single Responsibility):**
- Extend AdminDashboardService with API methods
- Add GetRecentInquiriesAsync
- Add GetMonthlyStatsAsync with caching
**Test Coverage:**
- Update FakeInquiryRepository mock with new methods
**SOLID Application:**
✓ Single Responsibility: Each class has one reason to change
✓ Open/Closed: Dashboard API can be extended without modifying existing code
✓ Dependency Inversion: Service depends on Repository abstraction
✓ Interface Segregation: API endpoints are focused and specific
Status: ✓ Compiles successfully (0 errors, 0 warnings)
Next phases:
- Add remaining API controllers (Announcement, Client, FAQ, TaxFiling)
- Refactor Blazor components to use API instead of services
- Implement JWT token refresh mechanism
- Add SignalR for change notifications
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Responsive Breakpoints (Mobile-First):**
- Mobile S (<480px): Single column, minimal padding, hidden subtitles
- Mobile L (480-599px): Single column with optimized spacing
- Tablet S (600-767px): Single column, collapsed drawer (60px wide)
- Tablet M (768-959px): 2-column metric grid, full drawer
- Tablet L (960-1023px): 3-column metric grid
- Desktop L (1024-1439px): 4-column metric grid, full layout
- Desktop XL (1440-1919px): 4-column with increased spacing
- Desktop XXL (1920px+): 4-column with maximum spacing
**Key Improvements:**
✓ Device-specific padding, margin, font-size optimizations
✓ Drawer behavior: full width on mobile, sidebar on tablet+
✓ Navigation: horizontal scroll on tablet S, full menu on larger screens
✓ Tables: font-size and padding scale with viewport
✓ Metric cards: responsive heights and spacing
✓ Page hero: column layout on mobile, row layout on desktop
✓ Typography: scales from 0.65rem to 2rem based on device
**Mobile Optimizations:**
- Hide non-critical elements (page subtitle)
- Compress navigation to icons
- Full-width buttons on small screens
- Horizontal scroll for navigation menu
- Optimized touch target sizes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Dashboard.razor Changes:**
- Replace MudGrid/MudItem with pure HTML div elements for reliable layout
- Remove dependency on MudBlazor grid components that were causing conflicts
- Use inline flexbox layout with emoji icons for better visual appeal
- Improve semantic structure and readability
**admin.css Improvements:**
- 4-column metric grid layout for desktop (1440px+)
- 3-column for laptops (1024px), 2-column for tablets (768px), 1-column for mobile
- Add hover effects: elevation, transform, top border animation
- Improve gradient backgrounds: more subtle, better color hierarchy
- Add professional box shadows and smooth transitions (cubic-bezier)
- Better padding and spacing for premium look
- Responsive design across all breakpoints
Visual improvements:
✓ Professional gradient backgrounds with hover states
✓ Smooth animations (0.3s cubic-bezier for premium feel)
✓ Better visual hierarchy with typography
✓ Proper spacing and alignment
✓ Accessibility-friendly color contrasts
✓ Mobile-first responsive design
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Convert .admin-metric-grid to CSS Grid (grid-template-columns: repeat(auto-fit))
- Add flexbox layout to .admin-metric-card for proper content distribution
- Remove all MudBlazor component direct styling (MudGrid, MudItem, MudPaper)
- Focus only on custom admin-* classes
- Fix metric cards layout (4-column desktop, responsive mobile)
- Improve typography and spacing hierarchy
- Add proper !important only where necessary for class overrides
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CI/CD generates version.json (JSON format) but Program.cs was parsing version.txt
- Update version loading to read from version.json
- Add error handling for JSON parsing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 자주 묻는 질문 4개 Bootstrap 아코디언으로 구현
(기장료, 양도세 상담, 무료 상담, 첫 상담 준비물)
- 최종 CTA 섹션 앞에 배치
- site.css: faq-accordion, faq-item, faq-question, faq-answer 스타일
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- TaxSeason / CurrentSeasonDto에 RelatedCategorySlug 추가
- TaxSeasonCalendar 각 시즌에 카테고리 슬러그 매핑
(income-tax→income-tax, vat-1st/2nd→vat, 종부세→real-estate-tax 등)
- IBlogPostRepository.GetByCategorySlugAsync 추가
- BlogService.GetSeasonalPostsAsync: 시즌 관련 글 2개 우선 + 나머지 최신 글로 채움
- IndexModel: SeasonalPosts / RecentPosts 분리 로드
- Index.cshtml 블로그 섹션: 시즌 중 "이번 시즌 추천" 배지 + 시즌별 전체보기 버튼
- site.css: blog-card--seasonal, seasonal-blog-tag, btn-seasonal 스타일
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Program.cs: MapRazorComponents에 AllowAnonymous 추가
JWT 미들웨어가 Blazor 셸 요청을 401로 차단하던 문제 수정
(인증은 Blazor AuthorizeRouteView → RedirectToLogin에서 처리)
- deploy.yml: SSH 1회 연결로 배포+헬스체크 통합
서버 사이드 폴링으로 대기(최대 120초), CI 측 sleep 제거
구 배포 디렉토리 최근 5개 자동 정리
secrets 파일 사전 검증 추가
- maintenance.html: 배포 중 Nginx가 직접 서빙할 점검 페이지
15초 자동 새로고침, 카카오 채널 링크 포함
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 연간 세무 캘린더(7개 시즌) 기반 자동 Hero 섹션 전환
- 시즌 감지 시 D-Day 카운트다운, 긴박감 배지, 시즌 CTA 표시
- 서비스 카드 순서 시즌 관련 항목 우선 정렬
- 어드민 공지사항 CRUD (등록·수정·삭제, 기간·유형 설정)
- 홈페이지 상단 공지 배너 자동 노출 (일반/배너/긴급)
- CLAUDE.md에 세무 캘린더 및 마케팅 방향 하네스 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>