Commit graph

13 commits

Author SHA1 Message Date
Tracewebstudio Dev
106561189f feat(ai-widget): Save to Profile button for profile_draft responses
All checks were successful
build-and-release / build (push) Successful in 1m52s
- Added confirmSaveProfile() — calls POST /api/ai/chat/confirm with
  action='save_profile', extracting the quoted improved text from the
  LLM's message automatically
- Green 'Save to Profile' button appears on profile_draft messages
  (actionType === 'profile_draft'), distinct from the ticket confirm flow
- actionLabel() extended with 'save_profile' key

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-14 18:43:31 +02:00
Tracewebstudio Dev
614b0ed43a feat(ai-chat): wire action buttons + ticket confirm flow in AiChatWidget
All checks were successful
build-and-release / build (push) Successful in 2m4s
ChatMessage gains actionType, userQuery, confirmed fields.
ChatResponse gains action_type from backend.

Action buttons now render below assistant messages:
- Navigation actions (open_help_search, open_billing, etc.) show a link
  chip to the correct dashboard section via navUrl()
- ticket_pending / create_ticket action shows a 'Create Support Ticket'
  button that calls POST /api/ai/chat/confirm, marks the message
  confirmed (hides the button), and appends the ticket result as a new
  assistant message

Helper functions navUrl() and actionLabel() map suggested_action keys
to dashboard URLs and human-readable labels respectively.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-14 18:06:20 +02:00
Tracewebstudio Dev
40e79f2d01 fix: ESLint, SolidJS reactivity bugs, role workflow bug fixes
All checks were successful
build-and-release / build (push) Successful in 2m16s
ESLint:
- Downgrade eslint v10 → v8.57.1 (compatible with @typescript-eslint v7 + eslint-plugin-solid)
- Fix .eslintrc.cjs: remove invalid require() calls, update to valid rule set
- Add npm run lint script

SolidJS solid/prefer-for (18 fixes across 3 files):
- OpportunityGraph.tsx: EDGES.map() → <For> with reactive visible/drawing signals
- PortfolioPage.tsx: services.map() and experience.map() → <For>
- DashboardDesignPreview.tsx: 15 .map() calls → <For> (stats, packages, timeline,
  testimonials, quick actions, step tabs, pills, form fields, status lists, buttons,
  counters, filter tabs)

Role workflow bug fixes (from full role audit):
- cover_letter → cover_note in job applications (field name canonical fix)
- applicant_user_id field name fix in shortlisted candidates
- CompanyApplicationsPage: GET → POST for contact unlock endpoint
- CreditsPage: /payments/history → /payments/invoices; response key data.data
- CreditsPage: holds response key data.data (not data.holds)
- ProfessionalResponsesPage: requirement_id → lead_id, decision_at → resolved_at
- PortfolioPage: data.items → data.data; fix vacuous-truth in form completion check;
  saveProfessionalForm: check res.ok before showing success
- CustomerBrowseProfessionalsPage: professional_role_code → profession_key
- MyDashboardPage: professional prefix split('_')[0] not replace('_','')

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-12 13:38:38 +02:00
Ashwin Kumar Sivakumar
6318b445d7 fix(ai-chat): fix gateway routing so chat send and KB lookups actually work
All checks were successful
build-and-release / build (push) Successful in 1m48s
AiChatWidget.tsx's local API constant was still "/api/gateway", a path
that only exists via the dev-only vite proxy and has no equivalent in
production (the gateway's resolve_upstream() has no "/api/gateway"
prefix). The usage-summary fetch had been patched to add auth headers
but this constant was left broken, and the two chat-send calls
(/chat/ask, /chat/message - the widget's core send-message path) were
untouched and doubly broken (wrong prefix plus a duplicated "/api").
Every send would 404 in production. Changed API to "/api" and dropped
the duplicated segment from both chat-send calls.

Also corrected a comment in CompanyJobsPage.tsx that incorrectly
described its own local API constant as "/api/gateway" (it's "/api");
no behavior change there, that fetch was already correct.

help-center.ts's uncommitted change (adding an "/api/gateway" prefix to
already-correct direct "/api/kb" calls) was reverted separately since it
introduced the same class of bug rather than fixing anything - it now
matches HEAD with no diff.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 05:48:15 +05:30
Ashwin Kumar Sivakumar
89ee3f8067 fix(ai): polish ask ash chat widget 2026-06-15 17:04:02 +05:30
Ashwin Kumar Sivakumar
5973e6216e fix(ai): align frontend with backend ai routes 2026-06-15 09:39:26 +05:30
Ashwin Kumar Sivakumar
5f535cba59 fix(ai): use authenticated ask ash chat path 2026-06-15 06:50:09 +05:30
Ashwin Kumar Sivakumar
b5d286ada3 Merge branch 'high-performance' of https://github.com/Traceworks2023/nxtgauge-frontend-solid into high-performance 2026-06-15 06:19:05 +05:30
Ashwin Kumar Sivakumar
491ade57c0 feat(ai): integrate AI usage/credits into dashboard and chat widget 2026-06-15 06:19:05 +05:30
Tracewebstudio Dev
031d332a1d feat: add cover letter generation and improve AI chat widget
- Add AI cover letter generation button on JobSeekerJobsPage
- Generate cover letters via /api/ai/generate-cover-letter
- Show generated cover letter preview before applying
- Update AI Chat Widget quick actions to focus on support & KB search
- Update welcome message to explain Ask Ash capabilities
2026-06-14 18:04:47 +02:00
Tracewebstudio Dev
8b90959f1e chore: update AI chat widget - add logo, remove powered by gemma 2026-05-05 20:14:56 +02:00
Tracewebstudio Dev
0d63bb304e Add comprehensive test infrastructure and AI guardrails
- Add Vitest unit tests for AiChatWidget component
- Add Playwright E2E tests: ai-chat-widget, api, security, guardrails
- Add AI guardrails tests validating no phone/email leaks from Ollama
- Add security tests: auth, rate limiting, input validation, token handling
- Add API tests for AI endpoints and authentication
- Fix playwright.config.ts reporter path conflict
- Update CompanyJobsPage with AI generate buttons (orange icon, loading state)
- Fix AiChatWidget accessibility (role=dialog, aria-label, aria-modal)
- Add app.css spin animation for AI loading spinner
- Add Gitea Actions workflow for nightly CI tests
- Add TESTING.md documentation
2026-05-01 02:54:25 +02:00
Tracewebstudio Dev
fe81ce54c7 feat: add floating AI chat widget to all pages
- Add AiChatWidget component with floating button in bottom-right
- Routes to /api/ai/chat/message for chat, ticket, form, cover letter intents
- Quick action buttons for common tasks
- Appears on all public pages via app.tsx root layout
- Appears on all dashboard pages via DashboardShell
2026-04-15 20:03:47 +02:00