Commit Graph

42 Commits

Author SHA1 Message Date
cesnimda 2989a6fa2c refactor(analytics): extract AnalyticsService from JobApplicationsController
First Wave 2 (safe refactor) slice. Move the read-only stats/overview aggregation
out of the 3.3k-line JobApplicationsController into a dedicated, injectable
AnalyticsService, and lift its response DTOs (JobStats, FunnelStagePoint,
ResponseRatePoint, CompanyActivityPoint, AnalyticsOverviewDto) into
Models/AnalyticsDtos.cs.

- GetStats: ~44 lines -> 3 (delegates to AnalyticsService.GetStatsAsync).
- GetAnalyticsOverview: ~82 lines -> 3 (delegates to GetAnalyticsOverviewAsync).
- Registered AddScoped<AnalyticsService>(); controller keeps an optional ctor
  param with a `?? new AnalyticsService(db)` fallback so the 6 test sites that
  construct the controller directly keep compiling.
- Logic is byte-identical (same tenant-scoped context, same projections) so
  behaviour is preserved.

Backend suite: 92/92 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 10:51:08 +02:00
cesnimda b8ec268736 perf(db): add owner-prefixed hot-path indexes on JobApplications
Add composite indexes (OwnerUserId, IsDeleted) — for the tenant-scoped
list/board/stats/analytics queries that all filter !IsDeleted — and
(OwnerUserId, FollowUpAt) for the reminders surface. Every JobApplication
query is scoped by the OwnerUserId global filter first, so owner-prefixed
composites are the useful shape; the pre-existing single OwnerUserId index
is now a redundant prefix but kept to avoid churn.

Status is intentionally excluded: Pomelo maps the unbounded string column to
MariaDB longtext, which cannot be indexed without a prefix length.

Applied via the startup schema reconciler (StartupInitializationExtensions),
which is how this repo actually provisions schema/indexes on both providers
(SQLite: CREATE INDEX IF NOT EXISTS; MariaDB: MySqlIndexExists-guarded CREATE
INDEX) — NOT via EF migrations, whose committed ModelSnapshot is stale.
OnModelCreating also declares the indexes for model consistency.

Backend suite: 92/92 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 10:30:44 +02:00
cesnimda 54abc9f546 Use Ollama rewrite path for CV generation 2026-04-11 22:26:03 +02:00
cesnimda 591c9b8a64 Clamp AI summarize lengths for CV rewrite 2026-04-11 21:55:51 +02:00
cesnimda fcccecefa3 Fix startup admin seeding connection scope 2026-04-11 18:27:33 +02:00
cesnimda 48cd83b442 Clean error alerts and harden startup migration 2026-04-11 18:07:20 +02:00
cesnimda b52371ea79 Fix backend deployment Playwright restore issue 2026-04-11 17:45:51 +02:00
cesnimda 09e96ce381 Fail closed on malformed local auth 2026-04-11 16:29:53 +02:00
cesnimda 6a223a4b70 Harden job import SSRF validation 2026-04-11 16:26:14 +02:00
cesnimda ce26325682 Tighten Gmail and export hot paths 2026-04-11 12:10:49 +02:00
cesnimda 27fd70a2d7 refactor, security updates, cv extraction upgrades 2026-04-11 01:34:32 +02:00
cesnimda 269dcb3487 Handle disconnected Gmail and bound CV rewrite prompts 2026-04-09 22:07:36 +02:00
cesnimda 69e78d8951 refactor: extract gmail matching service 2026-04-01 16:59:29 +02:00
cesnimda f48136f04c feat: enrich gmail correspondence metadata 2026-04-01 16:27:34 +02:00
cesnimda e5bcf9d5ea feat: harden gmail sync foundation 2026-04-01 16:09:29 +02:00
cesnimda 0d65835857 feat: add cv benchmark workflow and admin visibility 2026-04-01 12:25:45 +02:00
cesnimda 0551a525a8 feat: add server-backed profile CV builder pipeline 2026-04-01 12:25:35 +02:00
cesnimda f402213526 Extend CV classifier contract and provenance UI 2026-04-01 11:06:55 +02:00
cesnimda 44000f96f2 Improve CV parsing and profile editor flow 2026-03-29 14:29:18 +02:00
cesnimda 839a2ed80d Add CV template preview and PDF export pipeline 2026-03-29 00:43:54 +01:00
cesnimda 107c181506 Add canonical CV artifact pipeline 2026-03-28 23:32:54 +01:00
cesnimda 4103f84f85 Fix account and backup admin settings flows 2026-03-28 15:30:07 +01:00
cesnimda 19a4da9382 Auto-link verified Google sign-ins by email 2026-03-28 14:24:10 +01:00
cesnimda 13d4e29336 chore(M001/S01): auto-commit after complete-slice 2026-03-24 12:27:04 +01:00
cesnimda 955cae6d4b test(S01/T01): Added a job-scoped Gmail matching contract with backend-…
- JobTrackerApi/Controllers/GmailController.cs
- JobTrackerApi/Services/GmailOAuthService.cs
- JobTrackerApi.Tests/GmailControllerTests.cs
- .gsd/milestones/M001/slices/S01/S01-PLAN.md
- .gsd/KNOWLEDGE.md
2026-03-24 12:07:25 +01:00
cesnimda 3e5f796326 Complete S01 Gmail matching and import workflow 2026-03-24 10:06:50 +01:00
cesnimda 8db620e45b Add focus plans and stage-aware follow-up drafting 2026-03-23 22:04:39 +01:00
cesnimda 19b0424ef3 Document AI CV tools and follow-up reminder emails 2026-03-23 21:48:02 +01:00
cesnimda 5a31f86e4d Add reminder emails and AI CV improvement tools 2026-03-23 21:46:37 +01:00
cesnimda 653f713a78 Evolve summarizer into AI service with OCR support 2026-03-23 20:12:34 +01:00
cesnimda 90fdd8e1a5 Track cleanup progress and polish profile/system flows 2026-03-23 19:49:41 +01:00
cesnimda 4c49ffb0d6 feat: improve admin observability and translation-first summaries 2026-03-22 21:37:30 +01:00
cesnimda 9188039e9d feat: add application package generation and grouped readiness workflows 2026-03-22 18:28:02 +01:00
cesnimda 4ccfd6d055 perf: use stable sha256 cache keys for summarizer requests 2026-03-22 14:01:55 +01:00
cesnimda 0fa481cab6 Add full profiles and latency tests 2026-03-22 12:06:25 +01:00
cesnimda 5ed5b340a5 Feature: Remove message, Upgrade: pull better job data, add dedicated status section to job applications 2026-03-21 21:04:04 +01:00
cesnimda aa804aebe8 extract Text from gmail import, darkmode updates, auto update app versions etc 2026-03-21 20:44:02 +01:00
cesnimda 5e50a8fed7 Handle Stale access token for Gmail and update the startup schema repair. Style the kanban for darkmode better 2026-03-21 20:24:53 +01:00
cesnimda 2b0e86f0ac Fix Styling for kanban board, removed encrpytion for gmail as it was affecting connection 2026-03-21 20:03:50 +01:00
cesnimda ed68e44eaf Add OAth flow for Gmail and update tables and UI 2026-03-21 14:02:19 +01:00
cesnimda d09711dc97 Add analytics to summerizer app and dashboard updates 2026-03-21 13:03:47 +01:00
cesnimda 2e8a29b4d0 First Commit 2026-03-21 11:55:27 +01:00