Commit Graph
100 Commits
Author SHA1 Message Date
dayuan.jiang 46d2d4e078 refactor: add input validation and singleton pattern for Langfuse API routes
- Add Zod schema validation for log-feedback and log-save endpoints
- Create singleton LangfuseClient to avoid per-request instantiation
- Simplify log-save to only flag trace (no XML content sent)
- Use generic error messages to prevent info leakage
2025-12-04 23:44:00 +09:00
dayuan.jiang d8f2c85dab feat: link user feedback and diagram saves to chat traces in Langfuse
- Update log-feedback API to find existing chat trace by sessionId and attach score to it
- Update log-save API to create span on existing chat trace instead of standalone trace
- Add thumbs up/down feedback buttons on assistant messages
- Add message regeneration and edit functionality
- Add save dialog with format selection (drawio, png, svg)
- Pass sessionId through components for Langfuse linking
2025-12-04 22:56:59 +09:00
dayuan.jiang bc0f767ad7 Merge main into dev, resolve conflicts 2025-12-03 08:59:46 +09:00
dayuan.jiang 61ef41addf docs: add Docker badge to READMEs 2025-12-03 08:56:16 +09:00
dayuan.jiang 45ab934288 feat: add DeepSeek as AI provider
- Install @ai-sdk/deepseek package
- Add DeepSeek provider support to lib/ai-providers.ts
- Add DeepSeek configuration to env.example
- Update README.md with DeepSeek in provider list
- Support both default and custom base URL for DeepSeek
2025-12-02 11:52:09 +09:00
dayuan.jiang cd012f5e2f chore: remove github workflows 2025-12-02 01:12:49 +09:00
dayuan.jiang 00af87edbe fix: prevent duplicate PR review comments by tracking existing file:line 2025-11-29 12:55:53 +09:00
dayuan.jiang 468d6c0276 fix: require suggested fixes in PR review comments 2025-11-29 12:46:24 +09:00
dayuan.jiang 14f74b076f fix: remove gh pr comment from allowed tools to force inline comments only 2025-11-29 12:38:35 +09:00
dayuan.jiang 78d9229ca3 fix: remove gh pr comment from allowed tools to force inline comments only 2025-11-29 12:36:35 +09:00
dayuan.jiang d8e0a1daad fix: enforce inline comments for all issues found
- Explicitly require mcp inline comment tool for each issue
- Clarify gh pr comment is only for final summary
- Forbid dismissing issues as minor/harmless
2025-11-29 12:31:46 +09:00
dayuan.jiang b758f63d7f feat: use pull_request_target to support fork PR reviews 2025-11-29 11:09:51 +09:00
dayuan.jiang 603865fdb0 fix: add reopened trigger for pr-review workflow 2025-11-29 01:45:44 +09:00
dayuan.jiang 4cb4e187b3 Trigger PR review 2025-11-29 01:40:13 +09:00
dayuan.jiang c03c41d320 Run PR review on both opened and synchronize events 2025-11-29 01:29:25 +09:00
dayuan.jiang 9d248e25ad Resolve/collapse comment threads when issues are fixed 2025-11-29 01:26:00 +09:00
dayuan.jiang 4f4aae0e39 Check previous comments and mark resolved if fixed 2025-11-29 01:25:15 +09:00
dayuan.jiang b00579b257 Remove automatic comment cleanup - GitHub handles outdated comments 2025-11-29 01:23:01 +09:00
dayuan.jiang caf7ffe56c Clean up outdated review comments before new review 2025-11-29 01:21:44 +09:00
dayuan.jiang 50d16cbe47 Allow Claude to fetch AI SDK docs during PR review 2025-11-29 01:20:20 +09:00
dayuan.jiang 56167d363c Add specific AI SDK patterns to PR review prompt 2025-11-29 01:18:25 +09:00
dayuan.jiang 3e2dbbb541 Improve PR review prompt: add project context, narrow scope to real bugs only 2025-11-29 01:14:36 +09:00
dayuan.jiang efebcea3ba Fix PR review: use correct params and enable inline comments 2025-11-29 00:58:02 +09:00
dayuan.jiang 68824bc951 Enable inline code review comments like Vercel bot 2025-11-29 00:52:57 +09:00
dayuan.jiang 794826550d Use stable v1 instead of beta for claude-code-action 2025-11-29 00:44:58 +09:00
dayuan.jiang de98cf60ae Add Claude Code GitHub Actions with Bedrock and auto PR review 2025-11-29 00:29:56 +09:00
dayuan.jiang 455115935c fix: Remove conflicting width attribute from colspan cell in README table
The cell with colspan=2 should not have width=50% as it creates
a layout conflict causing horizontal table spanning on GitHub.
2025-11-17 19:07:43 +09:00
dayuan.jiang aa330f74b3 fix: Preserve state when resizing window to mobile size
Change mobile warning from unmounting components to showing an overlay.
This prevents losing diagram and chat state when window is resized.
2025-11-17 15:18:29 +09:00
dayuan.jiang 7a6a7eaf7c docs: Update examples with new prompts and demo images
- Add Examples section to README with 2-column grid layout
- Include demo images for GCP, AWS, Azure, animated connectors, and cat
- Update example panel buttons with clearer labels
- Add animated connector example button
- Add instruction for animated connectors in chat route
2025-11-17 15:12:16 +09:00
dayuan.jiang 5c5da397df chore: Update README for demo site link and simplify multi-provider support section 2025-11-16 09:16:02 +09:00
dayuan.jiang 5e5c1fc31c feat: Separate SEO content to /about page (best practice)
- Remove header from main page for clean editor-only interface
- Create /app/about/page.tsx with comprehensive SEO content (1000+ words)
- Add About link next to 'Next-AI-Drawio' title in chat panel
- Add GitHub icon link to /about page navigation
- Update sitemap.ts to include /about page (priority: 0.8)

SEO improvements following industry best practices:
- Separate marketing content from app interface (Figma/Canva/Miro approach)
- Server-rendered /about page for optimal crawlability
- Clean URL structure for better internal linking
- Multiple indexable pages for broader keyword coverage
- Proper semantic HTML: H1, H2, H3, article, section tags
- 1000+ words of keyword-rich content

/about page includes:
- AI diagram generator overview with value proposition
- 6 detailed feature sections (AI creation, AWS diagrams, image replication, etc.)
- 3 popular use cases (AWS architecture, flowcharts, system design)
- Step-by-step usage guide (4 steps)
- Benefits section (save time, precision, free, privacy)
- Clear call-to-action with link back to editor
- GitHub link in navigation for social proof

This follows Google-approved architecture and avoids hidden content penalties.
2025-11-16 09:04:01 +09:00
dayuan.jiang 50b860bdea fix: Update domain and improve SEO implementation
- Update all URLs from vercel.app to next-ai-drawio.jiang.jp
- Remove fake aggregateRating from JSON-LD (better SEO credibility)
- Move JSON-LD script to <head> for better SEO crawler detection
- Enhance JSON-LD description with specific features
- Add 'free diagram generator' and 'online diagram maker' keywords
- Improve Twitter Card description with call-to-action

Addresses critical issues identified in SEO review:
- Artificial rating data removed
- JSON-LD placement improved
- Domain consistency across all files
2025-11-16 08:41:49 +09:00
dayuan.jiang 533b3ccace feat: Add comprehensive SEO improvements
- Enhanced metadata with Open Graph and Twitter Card tags
- Added robots.ts for search engine crawling directives
- Added sitemap.ts for site structure
- Improved image alt text for better accessibility and SEO
- Added JSON-LD structured data (Schema.org SoftwareApplication)
- Configured proper meta tags including keywords, authors, and robots settings
- Set metadataBase for proper URL resolution
2025-11-16 08:36:13 +09:00
dayuan.jiang 065e8f0d62 chore: update readme 2025-11-15 15:32:21 +09:00
dayuan.jiang f23f1e3709 chore: bump version to 0.2.0 2025-11-15 15:16:40 +09:00
dayuan.jiang 58dcb3c41a feat: add OpenRouter support and fix input disabling
- Add OpenRouter provider support with @openrouter/ai-sdk-provider
- Fix input not disabling during 'submitted' state for fast providers
- Apply disable logic to all interactive elements (textarea, buttons, handlers)
- Clean up env.example by removing model examples and separator blocks
- Upgrade zod to v4.1.12 for compatibility with ollama-ai-provider-v2
- Add debug logging for status changes in chat components
2025-11-15 14:29:18 +09:00
dayuan.jiang 4a3abc2e39 add multiple provider 2025-11-15 13:36:42 +09:00
dayuan.jiang e53f77a2a6 feat: add show/hide chat panel with Ctrl+B shortcut
- Add toggle button in chat panel header
- Implement collapsed state with thin vertical strip
- Add Ctrl+B keyboard shortcut to toggle visibility
- Canvas expands to full width when chat is hidden
- Smooth 300ms transition animation
2025-11-15 12:09:32 +09:00
dayuan.jiang 71f5460418 chore: add support for multiple AI providers in the roadmap 2025-11-13 23:43:14 +09:00
dayuan.jiang cb458af371 chore: remove .claude/settings.local.json from git tracking 2025-11-13 23:29:57 +09:00
dayuan.jiang 8c4913d85e chore: remove ec2-push-script.sh and add to .gitignore 2025-11-13 23:24:50 +09:00
DayuanJiang 8b68e5740a Auto-commit before push 2025-11-13 14:20:08 +00:00
dayuan.jiang 7b08c7332a feat: add automatic fallback from edit_diagram to display_diagram with 3-retry policy
- Updated system prompt to allow up to 3 retry attempts with adjusted search patterns
- Simplified error response to provide current diagram XML and reference retry policy
- AI model self-manages retries based on system instructions
2025-11-13 22:51:03 +09:00
dayuan.jiang 34de984fb8 docs: update README and add env.example for API key configuration 2025-11-10 19:52:08 +09:00
dayuan.jiang 61aa0937d6 feat: add tool input streaminig 2025-11-10 19:45:59 +09:00
dayuan.jiang 6940a5156d refactor: improve diagram handling and error messaging in chat components 2025-11-10 11:27:25 +09:00
dayuan.jiang ce45339c0d fix: enhance file handling and UI improvements in chat and file preview components 2025-11-10 10:28:37 +09:00
dayuan.jiang 93d02a8d44 feat: add mobile detection with desktop-only message
Add responsive detection to show a message prompting users to access the application from desktop or laptop when viewing on mobile devices (screen width < 768px)
2025-11-10 09:25:56 +09:00
dayuan.jiang a3ada79a65 feat: add a image comfirm feature 2025-11-10 09:17:11 +09:00
dayuan.jiang c1923e84da minor: add a new example 2025-11-10 09:13:21 +09:00
dayuan.jiang bd1c113bec minor: fix prompt 2025-11-10 09:12:30 +09:00
dayuan.jiang 4efbe78d5a fix: enhance permissions in settings and update .gitignore for local config 2025-11-10 00:00:02 +09:00
dayuan.jiang d8d0a800fe fix: update dependencies and add settings for npm permissions 2025-11-09 23:24:15 +09:00
dayuan.jiang dc25473724 fix git ignore 2025-08-31 21:39:12 +09:00
dayuan.jiang 3af8087cb2 docs: update README with new features
- Add targeted XML editing feature description
- Add improved XML handling feature description
- Mark 'Allow LLM to modify XML' TODO as completed
2025-08-31 20:54:07 +09:00
dayuan.jiang de2a6938b1 feat: improve XML handling and edit_diagram tool
- Add formatXML function to format single-line XML with proper indentation
- Format chartXml after fetching to ensure consistency
- Update replaceXMLParts to handle single-line XML with substring fallback
- Improve edit_diagram tool guidance with SEARCH/REPLACE best practices
- Add concrete examples to help AI use minimal, targeted edits
2025-08-31 20:52:04 +09:00
dayuan.jiang b110f1cb63 change model back to gpt5 2025-08-31 12:59:29 +09:00
dayuan.jiang 44ec398f30 upgrade to ai-sdk 5 2025-08-31 12:54:14 +09:00
dayuan.jiang 1da5976235 update model to gpt-5 2025-08-19 01:17:17 +00:00
dayuan.jiang e36aedf2fd change the model back to gpt4.1 2025-07-31 22:01:24 +00:00
dayuan.jiang f7da48f132 fix: Prevent focus shift and diagram reversion when typing in chat 2025-07-31 09:32:44 +00:00
dayuan.jiang 7ffd48c215 change model 2025-07-31 08:14:43 +00:00
dayuan.jiang 6c641dbcf9 Feat: Add XML guide to prompt, update model and deps
- Integrate `xml_guide.md` into the system prompt to improve diagram generation by providing detailed XML formatting rules.
- Change the default AI model for chat completions to `openai("gpt-4.1")`.
- Update AI SDK packages (`@ai-sdk/amazon-bedrock`, `@ai-sdk/google`, `ai`) and other dependencies.
- Add `bun.lock` to the repository.
2025-05-22 00:44:24 +00:00
dayuan.jiang 932bf102ec fix: Implement auto-collapse for tool invocation args in chat message display 2025-04-04 02:29:33 +00:00
dayuan.jiang 78f2c4f60c fix: Integrate smoothStream and enhance chat message display with args handling 2025-04-04 02:10:24 +00:00
dayuan.jiang aeca1adf89 fix: Add maxDuration constant for chat API route 2025-04-04 01:48:15 +00:00
dayuan.jiang a44918385a fix: Enable tool call streaming in chat API route 2025-04-04 01:41:42 +00:00
dayuan.jiang 2d042af02b fix: Disable tool call streaming in chat API route 2025-04-04 01:28:50 +00:00
dayuan.jiang 8f3c11e0e8 fix: Enhance chat message display with chart handling and import new SDKs 2025-04-04 01:26:16 +00:00
dayuan.jiang 9967ee85ac chore: update package-lock.json 2025-04-03 23:53:32 +00:00
dayuan.jiang 5060aa957a chore: Update package-lock.json with new SWC binaries for various platforms 2025-04-03 23:51:23 +00:00
dayuan.jiang 7124bf03e9 minor: add some placeholder 2025-04-03 15:31:13 +00:00
dayuan.jiang d915318605 add github icon 2025-04-03 15:29:26 +00:00
dayuan.jiang 1e680640b8 feat: Add clipboard paste handling in ChatInput for image uploads 2025-04-03 15:18:14 +00:00
dayuan.jiang 645980fbb6 change model to claud 3.5 2025-04-03 15:10:53 +00:00
dayuan.jiang bc7ef5c5d4 refactor: Move DiagramProvider to RootLayout for improved context management 2025-03-27 08:24:17 +00:00
dayuan.jiang 008bb9d486 refactor: Simplify Home component layout by integrating DiagramPageLayout functionality directly 2025-03-27 08:17:54 +00:00
dayuan.jiang 0a895fda1e minor: remove unused function 2025-03-27 08:13:26 +00:00
dayuan.jiang 6c8b5c48a2 refactor: Relocate handleClear Logic: Move the chat and diagram clearing logic to ChatPanel (or a Server Action) and have ChatInput call the onClearChat prop. Introduce a clearDiagram method in DiagramContext. 2025-03-27 08:09:22 +00:00
dayuan.jiang 7e0790d60f refactor: update setFiles prop type to accept File[] and simplify file handling 2025-03-27 08:02:03 +00:00
dayuan.jiang 34cc437523 refactor: Reduce Prop Drilling & Improve Separation of Concerns: 2025-03-27 07:48:19 +00:00
dayuan.jiang 13ace596d2 refactor: move extractDiagramXML function to utils and remove unused file 2025-03-27 06:45:38 +00:00
dayuan.jiang f650f7b28c feat: add Vercel Analytics integration to the application 2025-03-26 13:44:02 +00:00
dayuan.jiang 64bb9dd900 refactor: simplify enhancedMessages construction in chat route 2025-03-26 10:58:48 +00:00
dayuan.jiang fa72097838 refactor: replace Tooltip components with ButtonWithTooltip in ChatInput 2025-03-26 10:32:33 +00:00
dayuan.jiang da98a184f9 refactor: extract ResetWarningModal from chat-input.tsx 2025-03-26 08:58:46 +00:00
dayuan.jiang 3b4072b113 refactor: extract HistoryDialog component 2025-03-26 08:51:21 +00:00
dayuan.jiang 15cd66d0bf minor: update refs in diagram context to use React.Ref type 2025-03-26 06:47:44 +00:00
dayuan.jiang 09dc466b2a minor: simplify DiagramPageLayout structure by removing unnecessary divs 2025-03-26 06:43:27 +00:00
dayuan.jiang 5c00c00584 refactor: extract all states to diagram-context. 2025-03-26 00:30:00 +00:00
dayuan.jiang bd6946a13c minor: fix the prompt 2025-03-25 10:56:08 +00:00
dayuan.jiang 5d152c66d5 fix: flash problem 2025-03-25 08:56:24 +00:00
dayuan.jiang 8882aa9ee1 fix: fix the issue that the diagram flash during generation 2025-03-25 08:56:11 +00:00
dayuan.jiang 21537f6e7b refactor: remove stepCounterRef prop and manage step counter internally 2025-03-25 04:23:38 +00:00
dayuan.jiang dedb5855c3 refactor: move message-display to seperate component. 2025-03-25 02:58:11 +00:00
dayuan.jiang d2a630929b refactor: chat-example-panel.tsx 2025-03-25 02:24:12 +00:00
dayuan.jiang a89781848b docs: update README.md 2025-03-24 02:43:27 +00:00
dayuan.jiang 19dacfad30 fix: Corrected a bug where the current XML file was not attached to the user message. 2025-03-24 02:38:27 +00:00
dayuan.jiang 05d1adc179 docs: update diagram representation library in README 2025-03-24 01:02:09 +00:00
dayuan.jiang e10d5e072f docs: add demo site link to README 2025-03-23 15:28:05 +00:00