Commit Graph

136 Commits

Author SHA1 Message Date
Ubuntu 6bce05dca2 fix(graphiti): flatten nested attribute dicts before Neo4j write; hide summary from properties panel
Graphiti's attribute extraction LLM sometimes returns values wrapped in
nested dicts ({"value": "CTTI"}) instead of plain strings. Neo4j rejects
these with TypeError: "Property values can only be of primitive types".

Fix: after _AzureGenericClient gets the LLM response, validate it through
the Pydantic response_model and call _flatten_attributes() so every value
reaching Neo4j is a scalar. Also add _flatten_attributes() helper.

UI: exclude 'summary' from the Properties section of the node detail panel
since it already appears in the dedicated Summary section below.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 20:08:39 +00:00
Ubuntu a6437df335 fix(i18n): translate hardcoded UI labels in Step1 ontology panel
Replace hardcoded English strings (GENERATED ENTITY TYPES, ATTRIBUTES,
EXAMPLES, etc.) and the Uploading message with i18n keys.
Add corresponding translations to all 4 locale files (ca/en/zh/es).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 23:45:57 +00:00
Ubuntu 7d172b9eec chore(i18n): replace all hardcoded Chinese strings with English in backend
Translate all Chinese comments, docstrings, log messages, error messages,
and LLM prompt text to English across the entire backend codebase.
Locale translation files (locales/*.json) are unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 23:40:58 +00:00
Ubuntu b5c4d4a336 feat(auth): add JWT login screen, production Dockerfile and Azure Container App Bicep
- Backend: POST /api/auth/login endpoint (PyJWT HS256, 24h expiry)
  require_auth before_request middleware protecting all /api/* routes
  except /login and /health; wsgi.py entry point for gunicorn;
  Flask serves compiled Vue SPA in production
- Frontend: LoginView.vue (MiroFish dark aesthetic), auth.js reactive
  store, Axios Bearer token injection + 401 → /login redirect,
  Vue Router global guard protecting all routes
- i18n: login keys added to en/zh/es/ca locale files
- Dockerfile: multi-stage build (node:20-slim → python:3.11-slim +
  gunicorn), single port 5001
- Azure: container-app.bicep following CTTI guidelines — Log Analytics
  (NOR0016-C 90d retention), Container Apps Environment, all .env vars
  as env vars (secrets via secretRef, plain values inline)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 18:46:39 +00:00
ghostubborn 223b283da7 fix(security): upgrade axios, rollup, picomatch to fix 3 high severity vulnerabilities 2026-04-02 15:00:33 +08:00
BaiFu af71244974
Merge pull request #428 from Ghostubborn/feat/i18n
feat(i18n): 添加多语言切换功能,支持中英文
2026-04-02 14:27:04 +08:00
ghostubborn ed465908db fix(i18n): set HTML lang attribute before Vue mounts via inline script 2026-04-02 14:21:09 +08:00
ghostubborn 65df257e19 chore(deps): upgrade vue-i18n from v9 to v11 2026-04-02 14:20:50 +08:00
ghostubborn 2421010fe1 fix(i18n): fix English workflow desc font size with correct CSS selectors 2026-04-01 19:11:22 +08:00
ghostubborn 3929c3ade2 fix(i18n): further shorten English metrics and improve workflow layout 2026-04-01 19:07:19 +08:00
ghostubborn 21922da6cc fix(i18n): improve English layout for homepage left-pane and report title
- Add sans-serif font for English left-pane (status, workflow sections)
- Shorten English workflow step descriptions
- Reduce English report title font-size from 36px to 28px
2026-04-01 19:04:38 +08:00
ghostubborn c6cafdd532 fix(i18n): translate world1/world2 platform labels in interview tool display 2026-04-01 18:38:22 +08:00
ghostubborn 5072a2eaa8 feat(i18n): replace Chinese UI text in Step4Report.vue render functions
Only UI display text is replaced. Regex parsing patterns are kept as-is
since they match the backend output format.
2026-04-01 18:35:18 +08:00
ghostubborn 6db3f98a48 fix(i18n): fix English homepage layout with proper font and shorter copy
- Use sans-serif font for English titles, descriptions and navbar
- Shorten English hero text to avoid overflow
- Fix :global() scoped CSS issue that was setting root font-size to 3.5rem
- Use separate unscoped style block for html[lang] selectors
2026-04-01 18:04:05 +08:00
ghostubborn 1d358fc492 feat(i18n): replace expand/collapse Chinese text in Step4Report.vue 2026-04-01 17:44:45 +08:00
ghostubborn 3a8451c119 feat(i18n): replace remaining hardcoded Chinese in frontend addLog calls 2026-04-01 17:21:55 +08:00
ghostubborn e1db8bacc2 feat(i18n): replace hardcoded Chinese in frontend addLog() messages 2026-04-01 16:35:35 +08:00
ghostubborn ffe6369c52 fix(i18n): fix curly quotes in Home.vue and remove unused dark theme from LanguageSwitcher 2026-04-01 16:23:52 +08:00
ghostubborn fbaa3dbbeb fix(i18n): fix curly quotes and missing @ alias in vite config 2026-04-01 15:45:43 +08:00
ghostubborn fc47ae81b5 feat(i18n): replace hardcoded Chinese in frontend components with i18n calls
Replace all user-visible hardcoded Chinese strings in 7 component files
with $t() / t() calls using vue-i18n:

- Step1GraphBuild: ontology generation, graph build, status badges
- Step2EnvSetup: simulation setup, agent personas, platform config,
  time config, initial activation, modal profile details
- Step3Simulation: report generation button
- Step4Report: section loading text, interaction button
- Step5Interaction: chat interface, survey UI, tool descriptions,
  error messages, agent selection
- GraphPanel: graph status hints, loading states, tooltips
- HistoryDatabase: history cards, modal, replay buttons

Added missing translation keys to both zh.json and en.json locale files.
Added useI18n imports to components that need script-level translations.
2026-04-01 15:43:11 +08:00
ghostubborn 70833821a2 feat(i18n): replace hardcoded Chinese in frontend views with i18n calls 2026-04-01 15:36:29 +08:00
ghostubborn 3d5e5d024d feat(i18n): add language switcher component to navigation 2026-04-01 15:24:58 +08:00
ghostubborn 22bf50f877 feat(i18n): set up vue-i18n with dynamic locale loading 2026-04-01 15:22:14 +08:00
ghostubborn 2ffadd3038 feat(i18n): add Accept-Language header to all API requests 2026-04-01 15:22:07 +08:00
666ghj 7c7c7a2c63 fix(deps): pin axios version to prevent potential supply chain risks 2026-04-01 14:54:33 +08:00
666ghj a795405428 style(home): add overflow-y property to upload zone and adjust alignment for files 2026-02-22 23:40:40 +08:00
666ghj ae1f38cdcc fix(report_agent): improve markdown rendering by cleaning up <br> tags around block-level elements and enhancing list formatting 2026-02-14 18:25:20 +08:00
666ghj 709a0d7023 feat(report_agent): enhance markdown rendering for lists and improve formatting; support nested lists and clean up HTML output 2026-02-14 17:04:04 +08:00
666ghj 7601d78fd4 feat(report_agent): enhance interview text processing and response handling; improve quote extraction and formatting for better clarity 2026-02-14 16:56:48 +08:00
666ghj f9abaf8e9f refactor(report_agent, Step4Report): simplify logging and remove subsection handling; update UI to reflect changes in section content generation 2026-02-06 18:13:30 +08:00
666ghj 0b71f89f96 fix(Step2EnvSetup): update expectedTotal only when API returns a valid value to prevent overwriting existing data 2026-01-29 10:58:36 +08:00
666ghj 0efd9352a0 feat(docker): add Docker support with Dockerfile, docker-compose.yml, and .dockerignore; update README for Docker deployment instructions 2026-01-22 14:35:41 +08:00
666ghj 085aa6bbe6 fix(GraphPanel): optimize force graph drag behavior to prevent simulation restart on click
Background:
- With many nodes, D3 force simulation tick callback updates all nodes/edges/labels every frame
- Original implementation called simulation.restart() in drag start event on mousedown
- Even after simulation converged, clicking a node to view details would restart simulation, causing lag

Solution:
- Distinguish between "click" and "drag" using 3px movement threshold
- On drag start: only record initial position, do not restart simulation
- On drag event: detect movement exceeding threshold before marking as actual drag and restarting simulation
- Pure click operations no longer trigger simulation restart, keeping graph static

Bug fix:
- Fixed issue where nodes became undraggable after initial optimization
- Cause: incorrectly used if(!event.active) check in drag event
- event.active equals 1 during drag event, causing restart() to never execute
- Removed that condition, using custom _isDragging flag to control logic instead
2026-01-18 22:35:24 +08:00
666ghj 49847c5b26 feat(Step5Interaction): add section number display for improved user navigation 2026-01-16 21:26:11 +08:00
666ghj ede410620a fix(Home.vue): update version text from V1.0 to v0.1 for accuracy 2026-01-14 15:16:52 +08:00
666ghj 8c817120f8 style(HistoryDatabase): update modal layout and enhance user guidance
- Changed the title for the environment configuration status icon to "环境搭建" for clarity.
- Added a creation time display in the project detail modal for better context.
- Introduced a divider for the playback section to improve visual separation.
- Enhanced navigation buttons with step indicators for clearer user progression.
- Added a hint for playback limitations to inform users about simulation requirements.
- Updated CSS styles for new elements and improved overall modal aesthetics.
2026-01-09 17:34:25 +08:00
666ghj 4977324497 style(HistoryDatabase): enhance card header and footer layout with status icons
- Updated card header to include status icons indicating project availability for different functionalities.
- Added a visual indicator for additional files when more than three are present.
- Improved card footer layout by grouping date and time, and enhancing progress display with status colors.
- Introduced new CSS styles for status icons and improved overall card aesthetics.
2026-01-09 16:42:31 +08:00
666ghj 0742194f9c style(HistoryDatabase): enhance modal design and transition effects
- Wrapped modal content in a Transition component for smoother animations.
- Adjusted modal dimensions and padding for improved layout and user experience.
- Updated styles for modal elements, including background colors, borders, and hover effects.
- Enhanced visual feedback for buttons and file items within the modal.
2026-01-09 16:13:37 +08:00
666ghj b4fe7f2f03 feat(HistoryDatabase): add project detail modal for enhanced user interaction
- Implemented a modal to display detailed information about selected projects, including simulation requirements and associated files.
- Added navigation buttons within the modal for quick access to project, simulation, and report pages.
- Enhanced user experience by allowing users to view project details without leaving the main interface.
2026-01-09 15:41:35 +08:00
666ghj aa47087b18 style(HistoryDatabase): adjust padding and max-width for improved layout
- Reduced top padding from 40px to 35px for better spacing.
- Increased max-width of the separator from 200px to 300px to enhance visual balance.
2026-01-09 11:26:27 +08:00
666ghj d79ea2b861 refactor(HistoryDatabase): enhance loading logic and card positioning
- Added route watcher to reload history data when navigating back to the homepage.
- Improved card positioning by adjusting vertical spacing for better visual alignment.
- Initialized IntersectionObserver to manage card visibility more effectively.
- Ensured data loading occurs after DOM rendering for smoother user experience.
2026-01-09 11:22:36 +08:00
666ghj 5e865c0234 refactor(HistoryDatabase): improve project display logic and loading states
- Added conditional rendering for the tech grid background and cards container based on project availability.
- Simplified the empty state display logic when no projects are present.
- Introduced a new CSS class to adjust layout when there are no projects, enhancing visual consistency.
2026-01-09 11:12:10 +08:00
666ghj cdf13739a6 refactor(HistoryDatabase): update card display to show round progress and time
- Changed card header to display round progress instead of status.
- Updated card footer to show formatted time instead of rounds.
- Introduced new methods for calculating progress class and formatting time.
- Adjusted styles for progress display and refined layout for better responsiveness.
2026-01-09 11:08:05 +08:00
666ghj 5a0c705cfb refactor(HistoryDatabase): enhance card expansion logic with pending state management
- Introduced a pending state to track the target expansion state during animations.
- Improved debounce handling to ensure smoother transitions and prevent rapid state changes.
- Updated logic to check for new pending states after animations complete, enhancing responsiveness and stability.
2026-01-09 10:57:48 +08:00
666ghj f32f5713f8 style(HistoryDatabase): adjust grid background position for improved layout
- Changed background position from center to top left to enhance grid alignment and responsiveness during height changes.
2026-01-09 10:53:44 +08:00
666ghj d7169bac91 refactor(HistoryDatabase): dynamically calculate container height based on card expansion state
- Introduced a computed property to adjust the container's minimum height based on the number of cards and expansion state.
- Removed static min-height styles to enhance responsiveness and visual consistency.
2026-01-09 10:49:23 +08:00
666ghj dfab81a6c0 refactor(HistoryDatabase): optimize card expansion behavior with debounce and animation lock
- Introduced a debounce mechanism to prevent rapid state changes during card expansion and collapse.
- Added an animation lock to avoid conflicts during transitions.
- Adjusted Intersection Observer thresholds and rootMargin for smoother detection and stability.
- Cleaned up resources on component unmounting to prevent memory leaks.
2026-01-09 10:46:32 +08:00
666ghj d90ec77f5d translate(HistoryDatabase): change section title from English to Chinese 2026-01-07 18:57:10 +08:00
666ghj 992f7d13c3 refactor(simulation): enhance simulation data retrieval and project file handling
- Updated simulation history retrieval to read project details directly from the Simulation file.
- Improved simulation configuration handling by reading simulation requirements from JSON.
- Added project file listing to the simulation history, displaying up to three associated files.
- Refined card layout in HistoryDatabase.vue to accommodate new file display features and improved responsiveness.
2026-01-07 18:54:33 +08:00
666ghj 6fc0a0d9ad refactor(HistoryDatabase): simplify CTA button positioning and adjust layout for improved responsiveness
- Removed dynamic offset calculation for the CTA button, fixing its position.
- Updated card layout logic to ensure proper stacking and alignment.
- Increased minimum heights for both collapsed and expanded states to enhance visual consistency.
2025-12-31 18:05:04 +08:00