Skip to content

前端史诗级加强+后端bugfixes#12

Merged
AperturePlus merged 93 commits into
mainfrom
develop
May 12, 2026
Merged

前端史诗级加强+后端bugfixes#12
AperturePlus merged 93 commits into
mainfrom
develop

Conversation

@AperturePlus

Copy link
Copy Markdown
Owner

No description provided.

AperturePlus and others added 30 commits May 6, 2026 10:57
Captures decisions from the brainstorming session: shift the web frontend
from AI-generated SaaS defaults to a deliberate Industrial Dashboard
identity (B), with single visual language, switchable accent (lime/amber/
oxide) and motion (spring/tight) preferences, IBM Plex + JetBrains Mono
typography, full Atomic Design component layering, and a layout-persistent
routing fix for the "page transition feels like refresh" complaint.

Why: existing UI lacked authorial voice — generic Manrope/translateY hover
lift/cubic-bezier(0.4,0,0.2,1) defaults that scream AI-generated. This spec
sets the architectural and visual anchor before implementation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Plan for the design token system phase (P0) of the frontend redesign:
new web/src/styles/ directory with tokens/{color,color.accent,type,space,
motion,edge,shadow}.css + reset.css + theme.css orchestrator + a
legacy-compat layer that aliases existing variable names so no Vue
component needs to be modified in this phase. Adds a synchronous
hydration script in index.html to set <html data-theme/accent/motion>
before mount.

15 bite-sized tasks with TDD-where-applicable, exact code, exact commands,
manual visual smoke verification, and explicit out-of-scope notes for
later phases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ests

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Tests assert class application + DOM structure rather than getComputedStyle:
neither happy-dom nor jsdom resolves var() inside class-based CSS rules,
so we verify the contract (class names) and rely on the dev library page
plus static token files for visual/value verification. Adds jsdom as a
backup dev dependency in case future tests need richer DOM emulation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AperturePlus and others added 29 commits May 11, 2026 23:38
- Add optional avatar field (string | null) to User interface in web/src/types/user.d.ts
- Ensures frontend user type definitions remain synchronized with backend schema changes
- Maintains camelCase naming convention consistent with backend API responses
- Update default Access Token TTL from 15 minutes to 3 days in agents.md documentation
- Adjust mock authentication handlers in web/src/mock/handlers/auth.ts to return expiresIn: 259200 (3 days in seconds)
- Improves user experience by reducing frequent re-authentication while maintaining security through refresh token rotation
- Aligns mock environment with production token expiration behavior
- Add extensive file-related translation keys to web/src/i18n/messages.ts covering toolbar actions, empty states, drag-and-drop, upload queue, bulk operations, table columns, and accessibility labels
- Support both Simplified Chinese (zh-CN) and English (en-US) locales with consistent terminology
- Update MyFiles.vue page to integrate locale store and replace hardcoded strings with translation keys (e.g., 'Drop files to upload' -> t('files.drag.dropToUpload'))
- Import useLocaleStore and add translation function for dynamic text rendering
- Enables full localization support for file management interface while maintaining accessibility and user experience
- Add /terms route in web/src/router/routes.ts with TermsOfUse component using BareLayout (no auth required)
- Add /privacy route for PrivacyPolicy component with similar configuration
- Create web/src/pages/terms/ directory with index.ts component for terms of service content
- Create web/src/pages/privacy/ directory with index.ts component for privacy policy content
- Both pages are publicly accessible (requiresAuth: false) and use bare layout for clean presentation
- Supports footer links to terms and privacy pages with proper routing integration
…ed UX

Footer Components:
- Update web/src/components/layout/Footer.vue to use router-link for Terms/Privacy navigation
- Update web/src/components/organisms/shell/Footer.vue with internationalization support using t('footer.termsOfService') and t('footer.privacyPolicy')

File Management Composables:
- Enhance useFileActions.ts with improved error handling for move operations, providing clearer feedback when all operations fail
- Update useUpload.ts with comprehensive internationalization:
  - Replace hardcoded strings with translation keys (e.g., ownerName uses t('files.owner.you'))
  - Add formatMessage helper for parameterized translations (success/failed upload toasts)
  - Use t('files.root.myFiles') for root folder name and t('files.upload.toast.unknownError') for generic errors
  - Improve drag-and-drop logic with better error handling and validation for internal file moves

File Management Components:
- Update all file organism components (BulkActionBar, EmptyState, FileRow, FileTable, FileToolbar, FileTreeNode, FolderTreeNode, UploadProgressTray) for consistency
- Update FileItemsView component to align with file management enhancements
- Components now support the new internationalization framework and improved user experience patterns
…ience

Backend Configuration:
- Update app/src/.env.example ACCESS_TOKEN_EXPIRE_MINUTES from 15 to 4320 minutes (3 days)
- Update app/src/core/settings.py access_token_expire_minutes to 60*24*3 for consistency
- Add avatar field to User model in app/src/models/tables_identity.py (nullable string, max 512 chars)

Frontend TypeScript Configuration:
- Add 'composite': true to web/tsconfig.app.json for better project references support
- Update web/tsconfig.node.json target to 'esnext' and lib to ['ESNext'] for modern JavaScript support
- Add 'composite': true and 'forceConsistentCasingInFileNames': true to tsconfig.node.json for consistency

Frontend Testing and Utilities:
- Update web/src/test/mount.ts to automatically include Pinia store in test setups for better state management testing
- Enhance web/src/utils/http.ts with sophisticated token refresh logic:
  - Add automatic token refresh on 401 errors for non-auth endpoints
  - Implement request deduplication to prevent multiple concurrent refresh attempts
  - Add retry mechanism for failed requests after successful token refresh
  - Improve error handling with better logging and user store cleanup
New Documentation:
- Add docs/superpowers/MEMORY.md documenting memory and knowledge graph capabilities
- Add docs/superpowers/frontend_aesthetic.md covering frontend design principles and aesthetics
- Add docs/superpowers/plans/2026-05-11-frontend-redesign-p1-atoms-molecules.md with redesign planning for atomic design components
- Add docs/superpowers/plans/2026-05-11-frontend-redesign-p3-core-file-path.md documenting core file path redesign strategy

Design Assets:
- Add library-tokens-amber.png and library-tokens-default.png design token assets for UI theming

Testing and Configuration:
- Add web/src/composables/useUpload.spec.ts for upload composable unit tests
- Add web/vite-env.d.ts for Vite environment type definitions

These additions provide comprehensive documentation for advanced features, design system planning, and improved development tooling.
- Update web/src/router/routes.ts name property to match the component and internationalization key
- Ensures consistency with footer link text and component naming conventions
…ze, new-folder cancel

Brainstormed design for the four UX changes on the My Files page:
- Accumulative single-click selection + Shift range + double-click activates
- View switcher icons (list / grid) replacing text labels
- Centered modal preview replacing the right-sidebar driven panel
- Resizable Name/Size/Updated columns (session-only, not persisted)
- ESC silent cancel for new folder + outside-click toast on empty name

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- openPreview captures document.activeElement instead of taking a trigger arg
- drop dead-code selectOnly from useFileSelection contract
- RightSidebar drops FileDetailPanel mount, renders static placeholder
- accumulative mode ignores Ctrl/Cmd; only Shift branches in onItemSelect

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bite-sized tasks for the four UX changes laid out in
2026-05-11-files-ux-tweaks-design.md. Order: icons -> data attrs ->
i18n -> composables (selection, preview, column resize, new-folder
cancel) -> molecule (SegmentedControl icon support) -> organisms
(FileToolbar, FilePreviewDialog, FileRow, FileTable) -> page (MyFiles)
-> layout / store rewire -> dev library demos -> final verify.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…vate/clear events

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…oast

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…PreviewDialog

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AperturePlus AperturePlus merged commit cd08983 into main May 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant