veycraft 2.8.2 → 2.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/workflows/profile-update.md +8 -8
- package/.agents/skills/apply-url/SKILL.md +10 -10
- package/.agents/skills/contract-and-nda-auditor/SKILL.md +9 -9
- package/.agents/skills/daily-run/SKILL.md +10 -10
- package/.agents/skills/demo/SKILL.md +10 -10
- package/.agents/skills/github-cli-remote-manager/SKILL.md +10 -10
- package/.agents/skills/offer-negotiator/SKILL.md +9 -9
- package/.agents/skills/profile-intelligence-engine/SKILL.md +10 -10
- package/.agents/skills/recruiter-inbox-triage/SKILL.md +9 -9
- package/.agents/skills/rejection-pattern-analyzer/SKILL.md +9 -9
- package/.agents/skills/score-calibration/SKILL.md +9 -9
- package/.agents/skills/setup/SKILL.md +10 -10
- package/.agents/skills/tailor-cv/SKILL.md +10 -10
- package/.agents/skills/weekly-report/SKILL.md +10 -10
- package/.aiassistant/rules/AGENTS.md +11 -11
- package/.aider.conf.yml +5 -5
- package/.amazonq/rules/job-hunter.md +12 -12
- package/.augment/rules/job-hunter.md +17 -17
- package/.clinerules +14 -14
- package/.continue/rules/job-hunter.md +15 -15
- package/.cursor/rules/job-hunter.mdc +9 -9
- package/.github/CODEOWNERS +3 -3
- package/.github/copilot-instructions.md +5 -5
- package/.github/prompts/daily-run.prompt.md +10 -10
- package/.goosehints +12 -12
- package/.junie/guidelines.md +12 -12
- package/.kiro/steering/job-hunter.md +15 -15
- package/.openhands/microagents/repo.md +18 -18
- package/.roo/rules/job-hunter.md +12 -12
- package/.rules +12 -12
- package/.trae/rules/project_rules.md +10 -10
- package/.windsurfrules +14 -14
- package/AGENTS.md +126 -126
- package/AUTHORS.md +13 -13
- package/CHANGELOG.md +330 -320
- package/CLAUDE.md +22 -22
- package/CRUSH.md +12 -12
- package/GEMINI.md +42 -42
- package/HIRED.md +32 -32
- package/LICENSE +26 -26
- package/NOTICE +22 -22
- package/PLATFORMS.md +93 -93
- package/PROVENANCE.json +19 -19
- package/README.ar.md +5 -1
- package/README.md +5 -1
- package/WARP.md +12 -12
- package/adapters/apps/chatgpt-and-web-chats.md +18 -18
- package/adapters/apps/devin-desktop.md +13 -13
- package/adapters/apps/gemini-and-copilot.md +25 -25
- package/adapters/apps/hermes-pi-factory-openclaw.md +24 -24
- package/adapters/apps/openai-codex-cli.md +23 -23
- package/adapters/apps/opencode-and-kilocode.md +16 -16
- package/adapters/apps/qwen-mistral-kimi-deepseek.md +37 -37
- package/adapters/models/claude.md +28 -28
- package/adapters/models/gemini.md +16 -16
- package/adapters/models/grok-and-kimi.md +14 -14
- package/adapters/models/mistral-and-llama.md +13 -13
- package/adapters/models/openai.md +16 -16
- package/bin/cli.mjs +0 -0
- package/commands/profile-update.md +1 -1
- package/config/guardrails.yaml +67 -67
- package/config/invariants.txt +7 -7
- package/context/DROP_YOUR_FILES_HERE.md +9 -9
- package/context/cv.md.example +12 -12
- package/context/form-answers.yaml.example +45 -45
- package/context/preferences.yaml.example +15 -15
- package/context/profile.md.example +20 -20
- package/context/readiness-state.json.example +64 -64
- package/context/resume-data.json.example +29 -29
- package/context/resume-facts.json.example +1 -1
- package/context/targets.yaml.example +433 -433
- package/docs/ARCHITECTURE.md +106 -106
- package/docs/OPTIONAL_MCP_PLUGINS.md +49 -49
- package/docs/SKILL_CATALOG.md +73 -73
- package/docs/chat-commands.md +33 -33
- package/docs/demo-dashboard.html +646 -646
- package/docs/execution-safety.md +34 -34
- package/docs/index.html +637 -637
- package/docs/platform-registry.md +23 -23
- package/evals/PROMPT.md +31 -31
- package/evals/README.md +36 -36
- package/evals/RUBRIC.md +51 -51
- package/evals/fixtures/boards/bayt-mock.html +255 -255
- package/evals/fixtures/boards/gulftalent-mock.html +250 -250
- package/evals/fixtures/boards/naukri-mock.html +262 -262
- package/evals/fixtures/boards/stepstone-mock.html +245 -245
- package/evals/fixtures/forms/workday-mock.html +328 -328
- package/evals/fixtures/ground-truth.json +53 -53
- package/evals/journeys/journey-matrix.json +333 -333
- package/evals/results/baseline-verified-run.json +125 -125
- package/llms.txt +70 -70
- package/package.json +115 -115
- package/prompts/partials/pacing.md +8 -8
- package/prompts/partials/snapshot-first.md +4 -4
- package/prompts/partials/stop-conditions.md +5 -5
- package/schemas/profile-update-plan.schema.json +133 -133
- package/schemas/readiness.schema.json +484 -484
- package/schemas/resume-data.schema.json +171 -171
- package/scripts/install.sh +0 -0
- package/skills/00-interrogate-and-onboard.md +87 -87
- package/skills/02-discover-and-triage.md +121 -121
- package/skills/03-tailor-resume-and-verify.md +114 -114
- package/skills/04-fill-and-apply.md +108 -108
- package/skills/07-persona-switcher.md +61 -61
- package/skills/18-condition-based-browser-waiting.md +65 -65
- package/skills/20-skill-authoring-standard.md +61 -61
- package/skills/21-ats-keyword-heatmap.md +60 -60
- package/skills/27-universal-cv-builder.md +99 -99
- package/skills/28-recruiter-brand-and-domain-intelligence.md +99 -99
- package/skills/54-github-cli-remote-manager.md +144 -144
- package/skills/REGISTRY.md +98 -98
- package/skills/ats/ashby.md +54 -54
- package/skills/ats/breezyhr.md +54 -54
- package/skills/ats/greenhouse.md +54 -54
- package/skills/ats/lever.md +54 -54
- package/skills/ats/smartrecruiters.md +54 -54
- package/skills/ats/taleo.md +43 -43
- package/skills/ats/workday.md +49 -49
- package/skills/meta-context-compaction.md +88 -88
- package/skills/meta-dom-recovery.md +63 -63
- package/skills/meta-self-verification.md +75 -75
- package/skills/meta-structured-debugging.md +69 -69
- package/skills/platforms/_template.md +69 -69
- package/skills/platforms/ats-engines.md +67 -67
- package/skills/platforms/global-boards.md +122 -122
- package/skills/platforms/linkedin.md +162 -162
- package/skills/platforms/mena-boards.md +99 -99
- package/skills/platforms/remote-boards.md +64 -64
- package/skills/platforms/wellfound.md +59 -59
- package/skills/profile-intelligence-engine.md +98 -98
- package/skills/skills-manifest.json +1730 -1730
- package/templates/analytics-dashboard.html +1106 -1106
- package/templates/ats-cover-letter-template.html +29 -29
- package/templates/ats-resume-template.html +38 -38
- package/templates/ats-resume.html +3 -3
- package/ui/app.js +1113 -1113
|
@@ -1,1106 +1,1106 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Veycraft — Local Career Intelligence Dashboard</title>
|
|
7
|
-
<style>
|
|
8
|
-
:root {
|
|
9
|
-
--bg: #070b14;
|
|
10
|
-
--panel: #0f172a;
|
|
11
|
-
--panel-alt: #162036;
|
|
12
|
-
--border: #24324d;
|
|
13
|
-
--text: #f1f5f9;
|
|
14
|
-
--muted: #94a3b8;
|
|
15
|
-
--accent: #10b981;
|
|
16
|
-
--accent-soft: rgba(16, 185, 129, 0.14);
|
|
17
|
-
--accent-blue: #38bdf8;
|
|
18
|
-
--blue-soft: rgba(56, 189, 248, 0.14);
|
|
19
|
-
--accent-amber: #f59e0b;
|
|
20
|
-
--amber-soft: rgba(245, 158, 11, 0.14);
|
|
21
|
-
--accent-red: #f87171;
|
|
22
|
-
--red-soft: rgba(248, 113, 113, 0.14);
|
|
23
|
-
--accent-purple: #a78bfa;
|
|
24
|
-
--purple-soft: rgba(167, 139, 250, 0.14);
|
|
25
|
-
}
|
|
26
|
-
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
27
|
-
body {
|
|
28
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
|
|
29
|
-
background: var(--bg);
|
|
30
|
-
color: var(--text);
|
|
31
|
-
line-height: 1.5;
|
|
32
|
-
padding: 24px 20px 40px;
|
|
33
|
-
}
|
|
34
|
-
.banner {
|
|
35
|
-
border-radius: 10px;
|
|
36
|
-
padding: 12px 16px;
|
|
37
|
-
font-size: 0.84rem;
|
|
38
|
-
margin-bottom: 18px;
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-wrap: wrap;
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
align-items: center;
|
|
43
|
-
gap: 10px;
|
|
44
|
-
}
|
|
45
|
-
.banner-sample {
|
|
46
|
-
background: var(--amber-soft);
|
|
47
|
-
border: 1px solid rgba(245, 158, 11, 0.45);
|
|
48
|
-
color: #fde68a;
|
|
49
|
-
}
|
|
50
|
-
.banner-local {
|
|
51
|
-
background: var(--accent-soft);
|
|
52
|
-
border: 1px solid rgba(16, 185, 129, 0.4);
|
|
53
|
-
color: #a7f3d0;
|
|
54
|
-
}
|
|
55
|
-
.banner-error {
|
|
56
|
-
background: var(--red-soft);
|
|
57
|
-
border: 1px solid rgba(248, 113, 113, 0.45);
|
|
58
|
-
color: #fecaca;
|
|
59
|
-
display: none;
|
|
60
|
-
}
|
|
61
|
-
.banner-error.visible { display: flex; }
|
|
62
|
-
.mode-pill {
|
|
63
|
-
display: inline-block;
|
|
64
|
-
padding: 2px 9px;
|
|
65
|
-
border-radius: 999px;
|
|
66
|
-
font-size: 0.72rem;
|
|
67
|
-
font-weight: 700;
|
|
68
|
-
letter-spacing: 0.04em;
|
|
69
|
-
text-transform: uppercase;
|
|
70
|
-
white-space: nowrap;
|
|
71
|
-
}
|
|
72
|
-
.mode-sample { background: rgba(245, 158, 11, 0.25); color: #fef3c7; border: 1px solid rgba(245, 158, 11, 0.5); }
|
|
73
|
-
.mode-local { background: rgba(16, 185, 129, 0.22); color: #d1fae5; border: 1px solid rgba(16, 185, 129, 0.45); }
|
|
74
|
-
header {
|
|
75
|
-
display: flex;
|
|
76
|
-
flex-wrap: wrap;
|
|
77
|
-
justify-content: space-between;
|
|
78
|
-
align-items: flex-start;
|
|
79
|
-
gap: 16px;
|
|
80
|
-
padding-bottom: 20px;
|
|
81
|
-
border-bottom: 1px solid var(--border);
|
|
82
|
-
margin-bottom: 24px;
|
|
83
|
-
}
|
|
84
|
-
.brand h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
|
|
85
|
-
.brand p { color: var(--muted); font-size: 0.86rem; }
|
|
86
|
-
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
|
|
87
|
-
.btn {
|
|
88
|
-
background: var(--panel-alt);
|
|
89
|
-
color: var(--text);
|
|
90
|
-
border: 1px solid var(--border);
|
|
91
|
-
padding: 8px 14px;
|
|
92
|
-
border-radius: 8px;
|
|
93
|
-
font-size: 0.825rem;
|
|
94
|
-
font-weight: 600;
|
|
95
|
-
cursor: pointer;
|
|
96
|
-
transition: background 0.15s, border-color 0.15s;
|
|
97
|
-
}
|
|
98
|
-
.btn:hover { background: #1e2d4b; border-color: var(--accent-blue); }
|
|
99
|
-
.btn-primary { background: #065f46; border-color: var(--accent); color: #ecfdf5; }
|
|
100
|
-
.btn-primary:hover { background: #047857; }
|
|
101
|
-
input[type="search"] {
|
|
102
|
-
background: var(--panel);
|
|
103
|
-
color: var(--text);
|
|
104
|
-
border: 1px solid var(--border);
|
|
105
|
-
padding: 8px 12px;
|
|
106
|
-
border-radius: 8px;
|
|
107
|
-
font-size: 0.825rem;
|
|
108
|
-
min-width: 220px;
|
|
109
|
-
}
|
|
110
|
-
.kpi-grid {
|
|
111
|
-
display: grid;
|
|
112
|
-
grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
|
|
113
|
-
gap: 14px;
|
|
114
|
-
margin-bottom: 28px;
|
|
115
|
-
}
|
|
116
|
-
.kpi-card {
|
|
117
|
-
background: var(--panel);
|
|
118
|
-
border: 1px solid var(--border);
|
|
119
|
-
border-radius: 12px;
|
|
120
|
-
padding: 16px 18px;
|
|
121
|
-
}
|
|
122
|
-
.kpi-label { color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
123
|
-
.kpi-value { font-size: 1.75rem; font-weight: 700; margin: 6px 0 4px; }
|
|
124
|
-
.kpi-value.muted-rate { font-size: 1.15rem; color: var(--muted); padding: 6px 0; }
|
|
125
|
-
.kpi-sub { color: var(--muted); font-size: 0.76rem; }
|
|
126
|
-
.section-title {
|
|
127
|
-
font-size: 1.05rem;
|
|
128
|
-
font-weight: 700;
|
|
129
|
-
margin-bottom: 14px;
|
|
130
|
-
display: flex;
|
|
131
|
-
flex-wrap: wrap;
|
|
132
|
-
justify-content: space-between;
|
|
133
|
-
align-items: center;
|
|
134
|
-
gap: 8px;
|
|
135
|
-
}
|
|
136
|
-
.section-note {
|
|
137
|
-
color: var(--muted);
|
|
138
|
-
font-size: 0.79rem;
|
|
139
|
-
font-weight: 400;
|
|
140
|
-
}
|
|
141
|
-
.kanban {
|
|
142
|
-
display: grid;
|
|
143
|
-
grid-template-columns: repeat(6, minmax(220px, 1fr));
|
|
144
|
-
gap: 14px;
|
|
145
|
-
overflow-x: auto;
|
|
146
|
-
padding-bottom: 12px;
|
|
147
|
-
margin-bottom: 28px;
|
|
148
|
-
}
|
|
149
|
-
.column {
|
|
150
|
-
background: var(--panel);
|
|
151
|
-
border: 1px solid var(--border);
|
|
152
|
-
border-radius: 12px;
|
|
153
|
-
padding: 14px;
|
|
154
|
-
min-height: 280px;
|
|
155
|
-
display: flex;
|
|
156
|
-
flex-direction: column;
|
|
157
|
-
gap: 10px;
|
|
158
|
-
}
|
|
159
|
-
.column-silent { border-color: rgba(245, 158, 11, 0.35); }
|
|
160
|
-
.col-header {
|
|
161
|
-
display: flex;
|
|
162
|
-
justify-content: space-between;
|
|
163
|
-
align-items: center;
|
|
164
|
-
font-size: 0.84rem;
|
|
165
|
-
font-weight: 700;
|
|
166
|
-
padding-bottom: 10px;
|
|
167
|
-
border-bottom: 1px solid var(--border);
|
|
168
|
-
}
|
|
169
|
-
.badge {
|
|
170
|
-
padding: 2px 8px;
|
|
171
|
-
border-radius: 999px;
|
|
172
|
-
font-size: 0.75rem;
|
|
173
|
-
font-weight: 700;
|
|
174
|
-
background: var(--panel-alt);
|
|
175
|
-
color: var(--text);
|
|
176
|
-
}
|
|
177
|
-
.card {
|
|
178
|
-
background: var(--panel-alt);
|
|
179
|
-
border: 1px solid var(--border);
|
|
180
|
-
border-radius: 10px;
|
|
181
|
-
padding: 12px;
|
|
182
|
-
font-size: 0.82rem;
|
|
183
|
-
display: flex;
|
|
184
|
-
flex-direction: column;
|
|
185
|
-
gap: 6px;
|
|
186
|
-
}
|
|
187
|
-
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
|
|
188
|
-
.card-pills { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
189
|
-
.mini-pill {
|
|
190
|
-
font-size: 0.68rem;
|
|
191
|
-
font-weight: 600;
|
|
192
|
-
padding: 1px 6px;
|
|
193
|
-
border-radius: 5px;
|
|
194
|
-
background: var(--blue-soft);
|
|
195
|
-
color: #bae6fd;
|
|
196
|
-
border: 1px solid rgba(56, 189, 248, 0.3);
|
|
197
|
-
}
|
|
198
|
-
.mini-pill.tailored {
|
|
199
|
-
background: var(--purple-soft);
|
|
200
|
-
color: #ddd6fe;
|
|
201
|
-
border-color: rgba(167, 139, 250, 0.35);
|
|
202
|
-
}
|
|
203
|
-
.mini-pill.muted {
|
|
204
|
-
background: rgba(148, 163, 184, 0.14);
|
|
205
|
-
color: #cbd5e1;
|
|
206
|
-
border-color: rgba(148, 163, 184, 0.3);
|
|
207
|
-
}
|
|
208
|
-
.sample-tag {
|
|
209
|
-
font-size: 0.66rem;
|
|
210
|
-
font-weight: 700;
|
|
211
|
-
text-transform: uppercase;
|
|
212
|
-
padding: 1px 6px;
|
|
213
|
-
border-radius: 4px;
|
|
214
|
-
background: var(--amber-soft);
|
|
215
|
-
color: #fcd34d;
|
|
216
|
-
border: 1px solid rgba(245, 158, 11, 0.35);
|
|
217
|
-
}
|
|
218
|
-
.card-title { font-weight: 700; color: #fff; font-size: 0.88rem; }
|
|
219
|
-
.card-company { color: #7dd3fc; font-weight: 600; }
|
|
220
|
-
.card-meta {
|
|
221
|
-
display: flex;
|
|
222
|
-
justify-content: space-between;
|
|
223
|
-
color: var(--muted);
|
|
224
|
-
font-size: 0.75rem;
|
|
225
|
-
}
|
|
226
|
-
.score-pill {
|
|
227
|
-
display: inline-block;
|
|
228
|
-
padding: 1px 7px;
|
|
229
|
-
border-radius: 6px;
|
|
230
|
-
font-weight: 700;
|
|
231
|
-
font-size: 0.72rem;
|
|
232
|
-
background: var(--accent-soft);
|
|
233
|
-
color: #6ee7b7;
|
|
234
|
-
border: 1px solid rgba(16, 185, 129, 0.35);
|
|
235
|
-
}
|
|
236
|
-
.card-notes {
|
|
237
|
-
color: var(--muted);
|
|
238
|
-
font-size: 0.74rem;
|
|
239
|
-
border-top: 1px dashed var(--border);
|
|
240
|
-
padding-top: 6px;
|
|
241
|
-
word-break: break-word;
|
|
242
|
-
}
|
|
243
|
-
.card a { color: var(--accent-blue); text-decoration: none; font-size: 0.75rem; }
|
|
244
|
-
.card a:hover { text-decoration: underline; }
|
|
245
|
-
.yield-panel {
|
|
246
|
-
background: var(--panel);
|
|
247
|
-
border: 1px solid var(--border);
|
|
248
|
-
border-radius: 12px;
|
|
249
|
-
padding: 20px;
|
|
250
|
-
margin-bottom: 24px;
|
|
251
|
-
}
|
|
252
|
-
.two-col {
|
|
253
|
-
display: grid;
|
|
254
|
-
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
255
|
-
gap: 20px;
|
|
256
|
-
margin-bottom: 24px;
|
|
257
|
-
}
|
|
258
|
-
.two-col .yield-panel { margin-bottom: 0; }
|
|
259
|
-
.aging-grid {
|
|
260
|
-
display: grid;
|
|
261
|
-
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
262
|
-
gap: 10px;
|
|
263
|
-
margin-bottom: 16px;
|
|
264
|
-
}
|
|
265
|
-
.aging-box {
|
|
266
|
-
background: var(--panel-alt);
|
|
267
|
-
border: 1px solid var(--border);
|
|
268
|
-
border-radius: 8px;
|
|
269
|
-
padding: 10px 12px;
|
|
270
|
-
}
|
|
271
|
-
.aging-box .aging-label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }
|
|
272
|
-
.aging-box .aging-val { font-size: 1.35rem; font-weight: 700; margin-top: 2px; }
|
|
273
|
-
.callout {
|
|
274
|
-
background: var(--panel-alt);
|
|
275
|
-
border: 1px solid var(--border);
|
|
276
|
-
border-radius: 8px;
|
|
277
|
-
padding: 10px 12px;
|
|
278
|
-
font-size: 0.8rem;
|
|
279
|
-
color: var(--muted);
|
|
280
|
-
margin-top: 12px;
|
|
281
|
-
}
|
|
282
|
-
.table-wrap { overflow-x: auto; }
|
|
283
|
-
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 520px; }
|
|
284
|
-
th, td {
|
|
285
|
-
text-align: left;
|
|
286
|
-
padding: 10px 12px;
|
|
287
|
-
border-bottom: 1px solid var(--border);
|
|
288
|
-
}
|
|
289
|
-
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 0.74rem; }
|
|
290
|
-
.bar-wrap {
|
|
291
|
-
width: 100%;
|
|
292
|
-
max-width: 160px;
|
|
293
|
-
background: var(--bg);
|
|
294
|
-
height: 8px;
|
|
295
|
-
border-radius: 999px;
|
|
296
|
-
overflow: hidden;
|
|
297
|
-
}
|
|
298
|
-
.bar-fill { height: 100%; background: var(--accent); }
|
|
299
|
-
.bar-fill.insufficient { background: var(--border); }
|
|
300
|
-
.empty-msg { color: var(--muted); font-size: 0.8rem; text-align: center; margin-top: 24px; }
|
|
301
|
-
footer { color: var(--muted); font-size: 0.78rem; text-align: center; margin-top: 20px; }
|
|
302
|
-
@media (max-width: 768px) {
|
|
303
|
-
body { padding: 16px 12px 32px; }
|
|
304
|
-
input[type="search"] { min-width: 0; width: 100%; }
|
|
305
|
-
.controls { width: 100%; }
|
|
306
|
-
.kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
307
|
-
.brand p, .banner { overflow-wrap: anywhere; }
|
|
308
|
-
}
|
|
309
|
-
@media (max-width: 520px) {
|
|
310
|
-
.kpi-grid { grid-template-columns: 1fr; }
|
|
311
|
-
}
|
|
312
|
-
</style>
|
|
313
|
-
</head>
|
|
314
|
-
<body>
|
|
315
|
-
<div id="data-banner" class="banner banner-local" role="status">
|
|
316
|
-
<div id="data-banner-text">
|
|
317
|
-
<strong>LOCAL USER RECORDS MODE (READ-ONLY):</strong> Displaying records from your local <code>logs/applications-log.json</code> (zero uploads, zero telemetry, zero ledger writes).
|
|
318
|
-
</div>
|
|
319
|
-
<span id="mode-pill" class="mode-pill mode-local">Local User Data</span>
|
|
320
|
-
</div>
|
|
321
|
-
|
|
322
|
-
<div id="error-banner" class="banner banner-error" role="alert">
|
|
323
|
-
<span id="error-banner-text"></span>
|
|
324
|
-
<button type="button" class="btn" id="dismiss-error-btn">Dismiss</button>
|
|
325
|
-
</div>
|
|
326
|
-
|
|
327
|
-
<header>
|
|
328
|
-
<div class="brand">
|
|
329
|
-
<h1>Veycraft — Local Career Intelligence & Pipeline</h1>
|
|
330
|
-
<p>100% Local Zero-Server Read-Only Dashboard · Source: <code id="source-label">logs/applications-log.json</code></p>
|
|
331
|
-
</div>
|
|
332
|
-
<div class="controls">
|
|
333
|
-
<input type="search" id="search-input" aria-label="Filter applications" placeholder="Filter company, role, platform, CV..." />
|
|
334
|
-
<label class="btn">
|
|
335
|
-
Load Local JSON File
|
|
336
|
-
<input type="file" id="file-input" accept=".json" style="display:none" />
|
|
337
|
-
</label>
|
|
338
|
-
<button class="btn btn-primary" id="demo-btn" type="button">Load Synthetic Sample</button>
|
|
339
|
-
<button class="btn" id="reset-btn" type="button">Reset to Local Logs</button>
|
|
340
|
-
</div>
|
|
341
|
-
</header>
|
|
342
|
-
|
|
343
|
-
<section class="kpi-grid">
|
|
344
|
-
<div class="kpi-card">
|
|
345
|
-
<div class="kpi-label">Total Submitted</div>
|
|
346
|
-
<div class="kpi-value" id="kpi-applied">0</div>
|
|
347
|
-
<div class="kpi-sub" id="kpi-applied-sub">0 non-submitted records excluded</div>
|
|
348
|
-
</div>
|
|
349
|
-
<div class="kpi-card">
|
|
350
|
-
<div class="kpi-label">Callback Rate %</div>
|
|
351
|
-
<div class="kpi-value" id="kpi-callback">n/a (n < 5)</div>
|
|
352
|
-
<div class="kpi-sub" id="kpi-callback-sub">Requires n ≥ 5 submitted applications</div>
|
|
353
|
-
</div>
|
|
354
|
-
<div class="kpi-card">
|
|
355
|
-
<div class="kpi-label">Avg Match Score</div>
|
|
356
|
-
<div class="kpi-value" id="kpi-score">—</div>
|
|
357
|
-
<div class="kpi-sub" id="kpi-score-sub">Scale 1–10 across displayed records</div>
|
|
358
|
-
</div>
|
|
359
|
-
<div class="kpi-card">
|
|
360
|
-
<div class="kpi-label">Active Pipeline</div>
|
|
361
|
-
<div class="kpi-value" id="kpi-active">0</div>
|
|
362
|
-
<div class="kpi-sub" id="kpi-active-sub">Applied (<14d), Interview, Assessment & Offer</div>
|
|
363
|
-
</div>
|
|
364
|
-
<div class="kpi-card">
|
|
365
|
-
<div class="kpi-label">Silent (≥14d)</div>
|
|
366
|
-
<div class="kpi-value" id="kpi-silent">0</div>
|
|
367
|
-
<div class="kpi-sub" id="kpi-silent-sub">No response ≥14d — never counted as rejected</div>
|
|
368
|
-
</div>
|
|
369
|
-
<div class="kpi-card">
|
|
370
|
-
<div class="kpi-label">Follow-Up Overdue</div>
|
|
371
|
-
<div class="kpi-value" id="kpi-overdue">0</div>
|
|
372
|
-
<div class="kpi-sub" id="kpi-overdue-sub">Applied ≥7d without logged follow-up</div>
|
|
373
|
-
</div>
|
|
374
|
-
</section>
|
|
375
|
-
|
|
376
|
-
<div class="section-title">
|
|
377
|
-
<span>Application Lifecycle Kanban</span>
|
|
378
|
-
<span class="section-note">Applied roles ≥14 days without update surface separately in Silent (≥14d) — never classified as rejected</span>
|
|
379
|
-
</div>
|
|
380
|
-
<section class="kanban" id="kanban-board"></section>
|
|
381
|
-
|
|
382
|
-
<div class="two-col">
|
|
383
|
-
<section class="yield-panel">
|
|
384
|
-
<div class="section-title">
|
|
385
|
-
<span>Aging Buckets & Response Timing</span>
|
|
386
|
-
<span class="section-note" id="timing-sample-note">Deterministic timestamps only</span>
|
|
387
|
-
</div>
|
|
388
|
-
<div class="aging-grid" id="aging-grid"></div>
|
|
389
|
-
<div class="callout" id="response-timing-summary"></div>
|
|
390
|
-
<div class="table-wrap" style="margin-top: 14px;">
|
|
391
|
-
<table>
|
|
392
|
-
<thead>
|
|
393
|
-
<tr>
|
|
394
|
-
<th>Overdue Follow-Up (≥7d)</th>
|
|
395
|
-
<th>Role</th>
|
|
396
|
-
<th>Platform</th>
|
|
397
|
-
<th>Applied</th>
|
|
398
|
-
<th>Days</th>
|
|
399
|
-
</tr>
|
|
400
|
-
</thead>
|
|
401
|
-
<tbody id="overdue-tbody"></tbody>
|
|
402
|
-
</table>
|
|
403
|
-
</div>
|
|
404
|
-
</section>
|
|
405
|
-
|
|
406
|
-
<section class="yield-panel">
|
|
407
|
-
<div class="section-title">
|
|
408
|
-
<span>CV Version Performance</span>
|
|
409
|
-
<span class="section-note">Owner CVs only · rates require n ≥ 5</span>
|
|
410
|
-
</div>
|
|
411
|
-
<div class="table-wrap">
|
|
412
|
-
<table>
|
|
413
|
-
<thead>
|
|
414
|
-
<tr>
|
|
415
|
-
<th>CV Version</th>
|
|
416
|
-
<th>Kind</th>
|
|
417
|
-
<th>Submitted</th>
|
|
418
|
-
<th>Callbacks</th>
|
|
419
|
-
<th>Callback Rate</th>
|
|
420
|
-
</tr>
|
|
421
|
-
</thead>
|
|
422
|
-
<tbody id="cv-tbody"></tbody>
|
|
423
|
-
</table>
|
|
424
|
-
</div>
|
|
425
|
-
<div class="callout" id="cv-tailored-note"></div>
|
|
426
|
-
</section>
|
|
427
|
-
</div>
|
|
428
|
-
|
|
429
|
-
<section class="yield-panel">
|
|
430
|
-
<div class="section-title">
|
|
431
|
-
<span>Platform & ATS Channel Yield Breakdown</span>
|
|
432
|
-
<span class="section-note">Minimum sample size n ≥ 5 required for conversion percentages</span>
|
|
433
|
-
</div>
|
|
434
|
-
<div class="table-wrap">
|
|
435
|
-
<table>
|
|
436
|
-
<thead>
|
|
437
|
-
<tr>
|
|
438
|
-
<th>Platform / Channel</th>
|
|
439
|
-
<th>Submitted</th>
|
|
440
|
-
<th>Callbacks</th>
|
|
441
|
-
<th>Callback Rate</th>
|
|
442
|
-
<th>Avg Match Score</th>
|
|
443
|
-
<th>Conversion Bar</th>
|
|
444
|
-
</tr>
|
|
445
|
-
</thead>
|
|
446
|
-
<tbody id="yield-tbody"></tbody>
|
|
447
|
-
</table>
|
|
448
|
-
</div>
|
|
449
|
-
<div class="callout" id="platform-humility-note">
|
|
450
|
-
Observational platform/channel differences reflect sample history only and do not establish ATS bias or causation.
|
|
451
|
-
</div>
|
|
452
|
-
</section>
|
|
453
|
-
|
|
454
|
-
<footer>
|
|
455
|
-
Generated locally by <code>veycraft</code> — Deterministic factual metrics only · Zero telemetry, zero external servers, zero ledger mutations.
|
|
456
|
-
</footer>
|
|
457
|
-
|
|
458
|
-
<script>
|
|
459
|
-
// Injected by `veycraft dashboard`
|
|
460
|
-
window.__JOB_HUNTER_LOGS__ = /*__APPLICATIONS_DATA__*/[];
|
|
461
|
-
window.__VEYCRAFT_ANALYTICS__ = /*__CAREER_ANALYTICS__*/null;
|
|
462
|
-
|
|
463
|
-
const MIN_SAMPLE_SIZE = 5;
|
|
464
|
-
const DAY_MS = 86400000;
|
|
465
|
-
|
|
466
|
-
const SYNTHETIC_DEMO_DATA = [
|
|
467
|
-
{
|
|
468
|
-
job_id: "sample-linkedin-40991823",
|
|
469
|
-
company: "CloudScale Payments (Synthetic)",
|
|
470
|
-
role: "Senior Full-Stack AI Engineer",
|
|
471
|
-
platform: "linkedin",
|
|
472
|
-
status: "interview",
|
|
473
|
-
match_score: 9.0,
|
|
474
|
-
cv_version_id: "cv-tailored-sample-01",
|
|
475
|
-
cv_tailoring: { is_tailored: true },
|
|
476
|
-
interviews: [{ interview_id: "int-sample-1", round: 1, stage: "recruiter_screen", status: "scheduled" }],
|
|
477
|
-
applied_at: new Date(Date.now() - 4 * DAY_MS).toISOString(),
|
|
478
|
-
updated_at: new Date(Date.now() - 2 * DAY_MS).toISOString(),
|
|
479
|
-
url: "https://example.invalid/jobs/40991823",
|
|
480
|
-
notes: "[Synthetic sample] Recruiter screen booked; tailored TypeScript + Playwright bullets."
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
job_id: "sample-greenhouse-8812",
|
|
484
|
-
company: "FinCore Infrastructure (Synthetic)",
|
|
485
|
-
role: "Staff Backend Engineer (Node.js)",
|
|
486
|
-
platform: "greenhouse",
|
|
487
|
-
status: "assessment",
|
|
488
|
-
match_score: 8.6,
|
|
489
|
-
cv_version_id: "cv-tailored-sample-01",
|
|
490
|
-
cv_tailoring: { is_tailored: true },
|
|
491
|
-
assessments: [{ assessment_id: "asmt-sample-1", type: "system_design_doc", status: "in_progress" }],
|
|
492
|
-
applied_at: new Date(Date.now() - 6 * DAY_MS).toISOString(),
|
|
493
|
-
updated_at: new Date(Date.now() - 3 * DAY_MS).toISOString(),
|
|
494
|
-
url: "https://example.invalid/jobs/8812",
|
|
495
|
-
notes: "[Synthetic sample] System design review scheduled."
|
|
496
|
-
},
|
|
497
|
-
{
|
|
498
|
-
job_id: "sample-wellfound-9921",
|
|
499
|
-
company: "Agentic Labs (Synthetic)",
|
|
500
|
-
role: "Founding AI Systems Engineer",
|
|
501
|
-
platform: "wellfound",
|
|
502
|
-
status: "offer",
|
|
503
|
-
match_score: 9.4,
|
|
504
|
-
cv_version_id: "cv-tailored-sample-01",
|
|
505
|
-
cv_tailoring: { is_tailored: true },
|
|
506
|
-
applied_at: new Date(Date.now() - 12 * DAY_MS).toISOString(),
|
|
507
|
-
updated_at: new Date(Date.now() - 5 * DAY_MS).toISOString(),
|
|
508
|
-
url: "https://example.invalid/jobs/9921",
|
|
509
|
-
notes: "[Synthetic sample] Fictional offer record for UI demonstration only (not a real outcome)."
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
job_id: "sample-wuzzuf-7710",
|
|
513
|
-
company: "NilePay Tech (Synthetic)",
|
|
514
|
-
role: "Senior Frontend Engineer",
|
|
515
|
-
platform: "wuzzuf",
|
|
516
|
-
status: "applied",
|
|
517
|
-
match_score: 8.1,
|
|
518
|
-
cv_version_id: "cv-base-sample-01",
|
|
519
|
-
cv_tailoring: { is_tailored: false },
|
|
520
|
-
applied_at: new Date(Date.now() - 9 * DAY_MS).toISOString(),
|
|
521
|
-
url: "https://example.invalid/jobs/7710",
|
|
522
|
-
notes: "[Synthetic sample] Confirmation snapshot recorded; Day 7 follow-up window active."
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
job_id: "sample-ashby-5520",
|
|
526
|
-
company: "SignalStack Systems (Synthetic)",
|
|
527
|
-
role: "Backend Platform Engineer",
|
|
528
|
-
platform: "ashby",
|
|
529
|
-
status: "applied",
|
|
530
|
-
match_score: 7.9,
|
|
531
|
-
cv_version_id: "cv-base-sample-01",
|
|
532
|
-
cv_tailoring: { is_tailored: false },
|
|
533
|
-
applied_at: new Date(Date.now() - 19 * DAY_MS).toISOString(),
|
|
534
|
-
url: "https://example.invalid/jobs/5520",
|
|
535
|
-
notes: "[Synthetic sample] No response yet after 19 days — displayed in Silent (>=14d), never as rejected."
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
job_id: "sample-lever-3319",
|
|
539
|
-
company: "OrbitMesh Cloud (Synthetic)",
|
|
540
|
-
role: "Platform Engineer",
|
|
541
|
-
platform: "lever",
|
|
542
|
-
status: "rejected",
|
|
543
|
-
match_score: 7.2,
|
|
544
|
-
cv_version_id: "cv-base-sample-01",
|
|
545
|
-
cv_tailoring: { is_tailored: false },
|
|
546
|
-
applied_at: new Date(Date.now() - 18 * DAY_MS).toISOString(),
|
|
547
|
-
updated_at: new Date(Date.now() - 11 * DAY_MS).toISOString(),
|
|
548
|
-
url: "https://example.invalid/jobs/3319",
|
|
549
|
-
notes: "[Synthetic sample] Confirmed closed requisition; Kubernetes multi-region gap noted."
|
|
550
|
-
}
|
|
551
|
-
];
|
|
552
|
-
|
|
553
|
-
const COLUMNS = [
|
|
554
|
-
{ key: "applied", title: "Applied (<14d)" },
|
|
555
|
-
{ key: "interview", title: "Interviewing" },
|
|
556
|
-
{ key: "assessment", title: "Technical Assessment" },
|
|
557
|
-
{ key: "offer", title: "Offer" },
|
|
558
|
-
{ key: "silent14d", title: "Silent (≥14d)", className: "column-silent" },
|
|
559
|
-
{ key: "rejected", title: "Rejected / Withdrawn" }
|
|
560
|
-
];
|
|
561
|
-
|
|
562
|
-
const initialLocal = Array.isArray(window.__JOB_HUNTER_LOGS__) ? window.__JOB_HUNTER_LOGS__ : [];
|
|
563
|
-
const injectedAnalytics = (window.__VEYCRAFT_ANALYTICS__ && typeof window.__VEYCRAFT_ANALYTICS__ === "object")
|
|
564
|
-
? window.__VEYCRAFT_ANALYTICS__
|
|
565
|
-
: null;
|
|
566
|
-
|
|
567
|
-
let activeRecords = initialLocal;
|
|
568
|
-
let dataMode = "local";
|
|
569
|
-
let sourceLabel = `logs/applications-log.json (${initialLocal.length} record(s))`;
|
|
570
|
-
let isCustomLoadedFile = false;
|
|
571
|
-
|
|
572
|
-
function showError(msg) {
|
|
573
|
-
const box = document.getElementById("error-banner");
|
|
574
|
-
document.getElementById("error-banner-text").textContent = msg;
|
|
575
|
-
box.classList.add("visible");
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
function clearError() {
|
|
579
|
-
document.getElementById("error-banner").classList.remove("visible");
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
function updateSourceBanner() {
|
|
583
|
-
const banner = document.getElementById("data-banner");
|
|
584
|
-
const text = document.getElementById("data-banner-text");
|
|
585
|
-
const pill = document.getElementById("mode-pill");
|
|
586
|
-
document.getElementById("source-label").textContent = sourceLabel;
|
|
587
|
-
|
|
588
|
-
if (dataMode === "sample") {
|
|
589
|
-
banner.className = "banner banner-sample";
|
|
590
|
-
text.innerHTML = '<strong>SYNTHETIC SAMPLE DATA ACTIVE:</strong> All companies, interviews, offers, and metrics below are fictional sample records for UI preview only — <strong>not</strong> real user or project outcomes. Click "Reset to Local Logs" or load your own JSON file.';
|
|
591
|
-
pill.className = "mode-pill mode-sample";
|
|
592
|
-
pill.textContent = "Synthetic Sample";
|
|
593
|
-
} else {
|
|
594
|
-
banner.className = "banner banner-local";
|
|
595
|
-
text.innerHTML = '<strong>LOCAL USER RECORDS MODE (READ-ONLY):</strong> Displaying records loaded strictly on your machine from local JSON (zero uploads, zero telemetry, zero ledger writes).';
|
|
596
|
-
pill.className = "mode-pill mode-local";
|
|
597
|
-
pill.textContent = "Local User Data";
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
const CANONICAL_STATUS_SET = new Set([
|
|
602
|
-
"discovered", "prepared", "dry_run", "skipped", "needs_review", "failed", "aborted",
|
|
603
|
-
"applied", "interview", "assessment", "offer", "rejected", "withdrawn"
|
|
604
|
-
]);
|
|
605
|
-
const LEGACY_STATUS_MAP = {
|
|
606
|
-
new: "discovered",
|
|
607
|
-
scanned: "discovered",
|
|
608
|
-
ready: "prepared",
|
|
609
|
-
tailored: "prepared",
|
|
610
|
-
"dry-run": "dry_run",
|
|
611
|
-
filtered: "skipped",
|
|
612
|
-
ghost: "skipped",
|
|
613
|
-
blacklisted: "skipped",
|
|
614
|
-
pending_review: "needs_review",
|
|
615
|
-
manual_apply: "needs_review",
|
|
616
|
-
error: "failed",
|
|
617
|
-
stopped: "aborted",
|
|
618
|
-
submitted: "applied",
|
|
619
|
-
interviewing: "interview",
|
|
620
|
-
screen: "interview",
|
|
621
|
-
responded: "interview",
|
|
622
|
-
phone_screen: "interview",
|
|
623
|
-
take_home: "assessment",
|
|
624
|
-
challenge: "assessment",
|
|
625
|
-
coding_test: "assessment",
|
|
626
|
-
hired: "offer",
|
|
627
|
-
accepted: "offer",
|
|
628
|
-
offer_received: "offer",
|
|
629
|
-
declined: "rejected",
|
|
630
|
-
closed: "rejected",
|
|
631
|
-
withdraw: "withdrawn"
|
|
632
|
-
};
|
|
633
|
-
const EMPLOYER_RESPONSE_STATUS_SET = new Set(["interview", "assessment", "offer", "rejected"]);
|
|
634
|
-
|
|
635
|
-
function canonicalStatus(raw) {
|
|
636
|
-
if (typeof raw !== "string") return "unknown";
|
|
637
|
-
const s = raw.trim().toLowerCase();
|
|
638
|
-
if (CANONICAL_STATUS_SET.has(s)) return s;
|
|
639
|
-
if (Object.prototype.hasOwnProperty.call(LEGACY_STATUS_MAP, s)) return LEGACY_STATUS_MAP[s];
|
|
640
|
-
return "unknown";
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
function classifyBucket(rec, refNowTs = Date.now()) {
|
|
644
|
-
if (!rec || typeof rec !== "object" || rec.provenance?.third_party_subject === true) return "excluded";
|
|
645
|
-
if (rec.submission_uncertain === true) return "excluded";
|
|
646
|
-
const s = canonicalStatus(rec.status);
|
|
647
|
-
if (["dry_run", "prepared", "skipped", "needs_review", "discovered", "failed", "aborted", "unknown"].includes(s)) {
|
|
648
|
-
return "excluded";
|
|
649
|
-
}
|
|
650
|
-
if (s === "offer") return "offer";
|
|
651
|
-
if (s === "assessment") return "assessment";
|
|
652
|
-
if (s === "interview") return "interview";
|
|
653
|
-
if (s === "rejected" || s === "withdrawn") return "rejected";
|
|
654
|
-
if (s === "applied") {
|
|
655
|
-
const ts = Date.parse(rec.applied_at || rec.date || "");
|
|
656
|
-
if (!Number.isNaN(ts) && Math.floor((refNowTs - ts) / DAY_MS) >= 14) return "silent14d";
|
|
657
|
-
return "applied";
|
|
658
|
-
}
|
|
659
|
-
return "excluded";
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
function normalizePlatform(raw) {
|
|
663
|
-
const p = String(raw || "other").trim().toLowerCase();
|
|
664
|
-
if (p.includes("linkedin")) return "LinkedIn";
|
|
665
|
-
if (p.includes("wellfound") || p.includes("angellist")) return "Wellfound";
|
|
666
|
-
if (p.includes("wuzzuf") || p.includes("bayt")) return "Wuzzuf / MENA";
|
|
667
|
-
if (["greenhouse", "lever", "ashby", "workday", "smartrecruiters", "breezyhr", "taleo", "workable"].some(k => p.includes(k))) {
|
|
668
|
-
return "Direct ATS (" + p + ")";
|
|
669
|
-
}
|
|
670
|
-
return raw || "Other";
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
function formatRateDisplay(numerator, denominator) {
|
|
674
|
-
if (denominator < MIN_SAMPLE_SIZE) {
|
|
675
|
-
return { text: `n/a (n=${denominator} < ${MIN_SAMPLE_SIZE})`, pct: null, sufficient: false };
|
|
676
|
-
}
|
|
677
|
-
const pct = ((numerator / denominator) * 100).toFixed(1);
|
|
678
|
-
return { text: `${pct}%`, pct: Number(pct), sufficient: true };
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
function quantileSorted(sorted, q) {
|
|
682
|
-
if (!sorted.length) return null;
|
|
683
|
-
if (sorted.length === 1) return Math.round(sorted[0] * 10) / 10;
|
|
684
|
-
const pos = (sorted.length - 1) * q;
|
|
685
|
-
const base = Math.floor(pos);
|
|
686
|
-
const rest = pos - base;
|
|
687
|
-
const val = sorted[base + 1] !== undefined
|
|
688
|
-
? sorted[base] + rest * (sorted[base + 1] - sorted[base])
|
|
689
|
-
: sorted[base];
|
|
690
|
-
return Math.round(val * 10) / 10;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
function hasPositiveCallback(rec) {
|
|
694
|
-
const st = canonicalStatus(rec.status);
|
|
695
|
-
const hist = Array.isArray(rec.stage_history) ? rec.stage_history.map(e => e?.to_status) : [];
|
|
696
|
-
const everInt = st === "interview" || (Array.isArray(rec.interviews) && rec.interviews.length > 0) || hist.includes("interview");
|
|
697
|
-
const everAsmt = st === "assessment" || (Array.isArray(rec.assessments) && rec.assessments.length > 0) || hist.includes("assessment");
|
|
698
|
-
const hasOffer = st === "offer" || hist.includes("offer");
|
|
699
|
-
return everInt || everAsmt || hasOffer;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
function computeClientAnalytics(records, refNowTs = Date.now()) {
|
|
703
|
-
const nowTs = refNowTs;
|
|
704
|
-
const aging = { fresh_0_6d: 0, followup_window_7_13d: 0, silent_14_29d: 0, stale_30d_plus: 0, unknown_applied_date: 0 };
|
|
705
|
-
const overdue = [];
|
|
706
|
-
const responseDeltas = [];
|
|
707
|
-
const cvMap = new Map();
|
|
708
|
-
const tailored = { submitted: 0, callbacks: 0 };
|
|
709
|
-
const generic = { submitted: 0, callbacks: 0 };
|
|
710
|
-
let unknownTailoring = 0;
|
|
711
|
-
|
|
712
|
-
for (const r of records) {
|
|
713
|
-
const b = classifyBucket(r, nowTs);
|
|
714
|
-
if (b === "excluded") continue;
|
|
715
|
-
const st = canonicalStatus(r.status);
|
|
716
|
-
const isCallback = hasPositiveCallback(r);
|
|
717
|
-
|
|
718
|
-
const appliedTs = Date.parse(r.applied_at || r.date || "");
|
|
719
|
-
const ageDays = Number.isNaN(appliedTs) ? null : Math.floor((nowTs - appliedTs) / DAY_MS);
|
|
720
|
-
|
|
721
|
-
if (st === "applied") {
|
|
722
|
-
if (ageDays === null || ageDays < 0) aging.unknown_applied_date++;
|
|
723
|
-
else if (ageDays < 7) aging.fresh_0_6d++;
|
|
724
|
-
else if (ageDays < 14) aging.followup_window_7_13d++;
|
|
725
|
-
else if (ageDays < 30) aging.silent_14_29d++;
|
|
726
|
-
else aging.stale_30d_plus++;
|
|
727
|
-
|
|
728
|
-
const notesStr = typeof r.notes === "string" ? r.notes : "";
|
|
729
|
-
const alreadyFollowedUp = Boolean(r.follow_up?.last_followed_up_at) || /followup_sent:/i.test(notesStr);
|
|
730
|
-
if (ageDays !== null && ageDays >= 7 && !alreadyFollowedUp) {
|
|
731
|
-
overdue.push({
|
|
732
|
-
job_id: r.job_id || null,
|
|
733
|
-
company: r.company || "Unknown Company",
|
|
734
|
-
title: r.title || r.role || "Untitled Role",
|
|
735
|
-
platform: r.platform || "direct",
|
|
736
|
-
applied_at: r.applied_at || r.date || "",
|
|
737
|
-
days_since_applied: ageDays
|
|
738
|
-
});
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
if (!Number.isNaN(appliedTs)) {
|
|
743
|
-
const candidates = [];
|
|
744
|
-
if (Array.isArray(r.stage_history)) {
|
|
745
|
-
for (const ev of r.stage_history) {
|
|
746
|
-
const evSt = canonicalStatus(ev?.to_status);
|
|
747
|
-
if (EMPLOYER_RESPONSE_STATUS_SET.has(evSt)) {
|
|
748
|
-
const t = Date.parse(ev.at || "");
|
|
749
|
-
if (!Number.isNaN(t)) candidates.push(t);
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
if (Array.isArray(r.interviews)) {
|
|
754
|
-
for (const iv of r.interviews) {
|
|
755
|
-
if (iv && iv.scheduled_at) {
|
|
756
|
-
const t = Date.parse(iv.scheduled_at);
|
|
757
|
-
if (!Number.isNaN(t)) candidates.push(t);
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
if (Array.isArray(r.assessments)) {
|
|
762
|
-
for (const asmt of r.assessments) {
|
|
763
|
-
if (asmt && asmt.received_at) {
|
|
764
|
-
const t = Date.parse(asmt.received_at);
|
|
765
|
-
if (!Number.isNaN(t)) candidates.push(t);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
if (!candidates.length && EMPLOYER_RESPONSE_STATUS_SET.has(st) && r.updated_at) {
|
|
770
|
-
const t = Date.parse(r.updated_at);
|
|
771
|
-
if (!Number.isNaN(t)) candidates.push(t);
|
|
772
|
-
}
|
|
773
|
-
const valid = candidates.filter(t => t >= appliedTs).sort((a, c) => a - c);
|
|
774
|
-
if (valid.length) responseDeltas.push((valid[0] - appliedTs) / DAY_MS);
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
const cvId = (typeof r.cv_version_id === "string" && r.cv_version_id.trim()) ? r.cv_version_id.trim() : "unattributed_legacy";
|
|
778
|
-
if (!cvMap.has(cvId)) {
|
|
779
|
-
cvMap.set(cvId, {
|
|
780
|
-
cv_version_id: cvId,
|
|
781
|
-
label: cvId === "unattributed_legacy" ? "Unattributed (Legacy / No CV Version Logged)" : cvId,
|
|
782
|
-
kind: typeof r.cv_tailoring?.is_tailored === "boolean" ? (r.cv_tailoring.is_tailored ? "tailored" : "generic") : "unknown",
|
|
783
|
-
submitted: 0,
|
|
784
|
-
callbacks: 0
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
const cvEntry = cvMap.get(cvId);
|
|
788
|
-
cvEntry.submitted++;
|
|
789
|
-
if (isCallback) cvEntry.callbacks++;
|
|
790
|
-
|
|
791
|
-
if (typeof r.cv_tailoring?.is_tailored === "boolean") {
|
|
792
|
-
const cohort = r.cv_tailoring.is_tailored ? tailored : generic;
|
|
793
|
-
cohort.submitted++;
|
|
794
|
-
if (isCallback) cohort.callbacks++;
|
|
795
|
-
} else {
|
|
796
|
-
unknownTailoring++;
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
overdue.sort((a, b) => (b.days_since_applied - a.days_since_applied) || String(a.job_id || "").localeCompare(String(b.job_id || "")));
|
|
801
|
-
responseDeltas.sort((a, b) => a - b);
|
|
802
|
-
const rtSufficient = responseDeltas.length >= MIN_SAMPLE_SIZE;
|
|
803
|
-
|
|
804
|
-
return {
|
|
805
|
-
timing: {
|
|
806
|
-
aging_buckets: aging,
|
|
807
|
-
overdue_follow_ups: overdue,
|
|
808
|
-
response_time: {
|
|
809
|
-
sample_n: responseDeltas.length,
|
|
810
|
-
sample_sufficient: rtSufficient,
|
|
811
|
-
median_days: rtSufficient ? quantileSorted(responseDeltas, 0.5) : null,
|
|
812
|
-
p75_days: rtSufficient ? quantileSorted(responseDeltas, 0.75) : null
|
|
813
|
-
}
|
|
814
|
-
},
|
|
815
|
-
cv_performance: {
|
|
816
|
-
by_cv_version: [...cvMap.values()].sort((a, b) => (b.submitted - a.submitted) || a.cv_version_id.localeCompare(b.cv_version_id)),
|
|
817
|
-
tailored_vs_generic: {
|
|
818
|
-
tailored,
|
|
819
|
-
generic,
|
|
820
|
-
unknown_count: unknownTailoring,
|
|
821
|
-
comparable: tailored.submitted >= MIN_SAMPLE_SIZE && generic.submitted >= MIN_SAMPLE_SIZE
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
function esc(str) {
|
|
828
|
-
const d = document.createElement("div");
|
|
829
|
-
d.textContent = str == null ? "" : String(str);
|
|
830
|
-
return d.innerHTML;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
function safeHref(url) {
|
|
834
|
-
try {
|
|
835
|
-
const parsed = new URL(String(url));
|
|
836
|
-
if (parsed.protocol === "https:" || parsed.protocol === "http:") return parsed.href;
|
|
837
|
-
} catch { /* ignore */ }
|
|
838
|
-
return null;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
function render(records, filterText = "") {
|
|
842
|
-
updateSourceBanner();
|
|
843
|
-
const q = filterText.trim().toLowerCase();
|
|
844
|
-
const filtered = records.filter(r => {
|
|
845
|
-
if (!q) return true;
|
|
846
|
-
return [r.company, r.role, r.title, r.platform, r.status, r.notes, r.cv_version_id]
|
|
847
|
-
.some(v => String(v || "").toLowerCase().includes(q));
|
|
848
|
-
});
|
|
849
|
-
|
|
850
|
-
const useInjected = dataMode === "local" && !isCustomLoadedFile && !q && injectedAnalytics;
|
|
851
|
-
const parsedInjectedNow = useInjected && injectedAnalytics.computed_at ? Date.parse(injectedAnalytics.computed_at) : Number.NaN;
|
|
852
|
-
const refNowTs = !Number.isNaN(parsedInjectedNow) ? parsedInjectedNow : Date.now();
|
|
853
|
-
|
|
854
|
-
const buckets = { applied: [], interview: [], assessment: [], offer: [], silent14d: [], rejected: [], excluded: [] };
|
|
855
|
-
for (const r of filtered) {
|
|
856
|
-
buckets[classifyBucket(r, refNowTs)].push(r);
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
const submitted = [
|
|
860
|
-
...buckets.applied,
|
|
861
|
-
...buckets.interview,
|
|
862
|
-
...buckets.assessment,
|
|
863
|
-
...buckets.offer,
|
|
864
|
-
...buckets.silent14d,
|
|
865
|
-
...buckets.rejected
|
|
866
|
-
];
|
|
867
|
-
const analyticsView = useInjected ? injectedAnalytics : computeClientAnalytics(filtered, refNowTs);
|
|
868
|
-
const submittedCount = useInjected ? analyticsView.funnel.submitted_count : submitted.length;
|
|
869
|
-
const excludedCount = useInjected ? analyticsView.funnel.excluded_non_submitted_count : buckets.excluded.length;
|
|
870
|
-
const callbacks = useInjected ? analyticsView.funnel.positive_callbacks_count : submitted.filter(hasPositiveCallback).length;
|
|
871
|
-
const silentCount = useInjected ? analyticsView.funnel.silent_14d_count : buckets.silent14d.length;
|
|
872
|
-
const activeCount = buckets.applied.length + buckets.interview.length + buckets.assessment.length + buckets.offer.length;
|
|
873
|
-
const cbRate = formatRateDisplay(callbacks, submittedCount);
|
|
874
|
-
|
|
875
|
-
const scores = filtered
|
|
876
|
-
.map(r => {
|
|
877
|
-
const raw = r.match_score !== null && r.match_score !== undefined ? r.match_score : r.score;
|
|
878
|
-
return (raw === null || raw === undefined || raw === "") ? Number.NaN : Number(raw);
|
|
879
|
-
})
|
|
880
|
-
.filter(n => Number.isFinite(n) && n > 0 && n <= 10);
|
|
881
|
-
const avgScore = useInjected
|
|
882
|
-
? (analyticsView.funnel.avg_match_score !== null && analyticsView.funnel.avg_match_score !== undefined ? analyticsView.funnel.avg_match_score.toFixed(1) : "—")
|
|
883
|
-
: (scores.length ? (scores.reduce((a, b) => a + b, 0) / scores.length).toFixed(1) : "—");
|
|
884
|
-
|
|
885
|
-
document.getElementById("kpi-applied").textContent = String(submittedCount);
|
|
886
|
-
document.getElementById("kpi-applied-sub").textContent = `${excludedCount} non-submitted / excluded record(s)`;
|
|
887
|
-
|
|
888
|
-
const cbEl = document.getElementById("kpi-callback");
|
|
889
|
-
cbEl.textContent = cbRate.text;
|
|
890
|
-
cbEl.className = cbRate.sufficient ? "kpi-value" : "kpi-value muted-rate";
|
|
891
|
-
document.getElementById("kpi-callback-sub").textContent = cbRate.sufficient
|
|
892
|
-
? `${callbacks} callback(s) across ${submittedCount} submitted`
|
|
893
|
-
: `${callbacks} callback(s) / ${submittedCount} submitted (min n=${MIN_SAMPLE_SIZE} required)`;
|
|
894
|
-
|
|
895
|
-
document.getElementById("kpi-score").textContent = avgScore;
|
|
896
|
-
document.getElementById("kpi-active").textContent = String(activeCount);
|
|
897
|
-
document.getElementById("kpi-silent").textContent = String(silentCount);
|
|
898
|
-
document.getElementById("kpi-overdue").textContent = String(analyticsView.timing.overdue_follow_ups.length);
|
|
899
|
-
|
|
900
|
-
// Kanban Board (6 columns — Silent >=14d strictly separated from Rejected / Withdrawn)
|
|
901
|
-
const board = document.getElementById("kanban-board");
|
|
902
|
-
board.innerHTML = COLUMNS.map(col => {
|
|
903
|
-
const items = buckets[col.key] || [];
|
|
904
|
-
const cardsHtml = items.length
|
|
905
|
-
? items.map(item => {
|
|
906
|
-
const role = item.role || item.title || "Untitled Role";
|
|
907
|
-
const score = item.match_score ?? item.score ?? "—";
|
|
908
|
-
const dateStr = (item.applied_at || item.date || "").slice(0, 10) || "n/a";
|
|
909
|
-
const href = item.url ? safeHref(item.url) : null;
|
|
910
|
-
const link = href && dataMode === "local"
|
|
911
|
-
? `<a href="${esc(href)}" target="_blank" rel="noopener noreferrer">Open posting ↗</a>`
|
|
912
|
-
: "";
|
|
913
|
-
const samplePill = dataMode === "sample" ? `<span class="sample-tag">Sample</span>` : "";
|
|
914
|
-
|
|
915
|
-
const v2Pills = [];
|
|
916
|
-
if (item.cv_version_id) v2Pills.push(`<span class="mini-pill">CV: ${esc(item.cv_version_id)}</span>`);
|
|
917
|
-
if (item.cv_tailoring?.is_tailored === true) v2Pills.push(`<span class="mini-pill tailored">Tailored</span>`);
|
|
918
|
-
else if (item.cv_tailoring?.is_tailored === false) v2Pills.push(`<span class="mini-pill muted">Generic</span>`);
|
|
919
|
-
if (Array.isArray(item.interviews) && item.interviews.length > 0) {
|
|
920
|
-
v2Pills.push(`<span class="mini-pill">Rounds: ${item.interviews.length}</span>`);
|
|
921
|
-
}
|
|
922
|
-
if (Array.isArray(item.assessments) && item.assessments.length > 0) {
|
|
923
|
-
v2Pills.push(`<span class="mini-pill">Assessments: ${item.assessments.length}</span>`);
|
|
924
|
-
}
|
|
925
|
-
if (canonicalStatus(item.status) === "withdrawn") {
|
|
926
|
-
v2Pills.push(`<span class="mini-pill muted">Withdrawn</span>`);
|
|
927
|
-
}
|
|
928
|
-
const pillsRow = v2Pills.length ? `<div class="card-pills">${v2Pills.join("")}</div>` : "";
|
|
929
|
-
|
|
930
|
-
return `<div class="card">
|
|
931
|
-
<div class="card-top">
|
|
932
|
-
<div class="card-company">${esc(item.company || "Unknown Company")}</div>
|
|
933
|
-
${samplePill}
|
|
934
|
-
</div>
|
|
935
|
-
<div class="card-title">${esc(role)}</div>
|
|
936
|
-
<div class="card-meta">
|
|
937
|
-
<span>${esc(item.platform || "direct")} · ${esc(dateStr)}</span>
|
|
938
|
-
<span class="score-pill">${esc(score)}/10</span>
|
|
939
|
-
</div>
|
|
940
|
-
${pillsRow}
|
|
941
|
-
${link}
|
|
942
|
-
${item.notes ? `<div class="card-notes">${esc(item.notes)}</div>` : ""}
|
|
943
|
-
</div>`;
|
|
944
|
-
}).join("")
|
|
945
|
-
: `<div class="empty-msg">No records in ${esc(col.title)}</div>`;
|
|
946
|
-
return `<div class="column ${col.className || ""}">
|
|
947
|
-
<div class="col-header">
|
|
948
|
-
<span>${esc(col.title)}</span>
|
|
949
|
-
<span class="badge">${items.length}</span>
|
|
950
|
-
</div>
|
|
951
|
-
${cardsHtml}
|
|
952
|
-
</div>`;
|
|
953
|
-
}).join("");
|
|
954
|
-
|
|
955
|
-
// Aging & Response Timing Panel
|
|
956
|
-
const aging = analyticsView.timing.aging_buckets;
|
|
957
|
-
document.getElementById("aging-grid").innerHTML = [
|
|
958
|
-
{ label: "0–6d Fresh", val: aging.fresh_0_6d },
|
|
959
|
-
{ label: "7–13d Follow-Up", val: aging.followup_window_7_13d },
|
|
960
|
-
{ label: "14–29d Silent", val: aging.silent_14_29d },
|
|
961
|
-
{ label: "30d+ Stale", val: aging.stale_30d_plus },
|
|
962
|
-
{ label: "Unknown Date", val: aging.unknown_applied_date }
|
|
963
|
-
].map(b => `<div class="aging-box"><div class="aging-label">${esc(b.label)}</div><div class="aging-val">${b.val}</div></div>`).join("");
|
|
964
|
-
|
|
965
|
-
const rt = analyticsView.timing.response_time;
|
|
966
|
-
const rtSummary = document.getElementById("response-timing-summary");
|
|
967
|
-
if (!rt || rt.sample_n === 0) {
|
|
968
|
-
rtSummary.textContent = "Response timing: no verified employer post-application response timestamps recorded yet.";
|
|
969
|
-
} else if (!rt.sample_sufficient || rt.median_days === null) {
|
|
970
|
-
rtSummary.textContent = `Observed time-to-first-response: n/a (sample n=${rt.sample_n} < ${MIN_SAMPLE_SIZE}; requires n ≥ ${MIN_SAMPLE_SIZE}).`;
|
|
971
|
-
} else {
|
|
972
|
-
rtSummary.textContent = `Observed time-to-first-response: median ${rt.median_days}d · P75 ${rt.p75_days}d (n=${rt.sample_n}).`;
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
const overdueList = analyticsView.timing.overdue_follow_ups || [];
|
|
976
|
-
const overdueTbody = document.getElementById("overdue-tbody");
|
|
977
|
-
if (!overdueList.length) {
|
|
978
|
-
overdueTbody.innerHTML = `<tr><td colspan="5" style="color:var(--muted);text-align:center;">No overdue ≥7d follow-ups in the displayed set.</td></tr>`;
|
|
979
|
-
} else {
|
|
980
|
-
overdueTbody.innerHTML = overdueList.slice(0, 12).map(item => `<tr>
|
|
981
|
-
<td><strong>${esc(item.company || "Unknown")}</strong></td>
|
|
982
|
-
<td>${esc(item.title || "Untitled Role")}</td>
|
|
983
|
-
<td>${esc(item.platform || "direct")}</td>
|
|
984
|
-
<td>${esc((item.applied_at || "").slice(0, 10) || "n/a")}</td>
|
|
985
|
-
<td>${esc(item.days_since_applied)}d</td>
|
|
986
|
-
</tr>`).join("");
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
// CV Version Performance Panel
|
|
990
|
-
const cvRows = analyticsView.cv_performance?.by_cv_version || [];
|
|
991
|
-
const cvTbody = document.getElementById("cv-tbody");
|
|
992
|
-
if (!cvRows.length) {
|
|
993
|
-
cvTbody.innerHTML = `<tr><td colspan="5" style="color:var(--muted);text-align:center;">No submitted applications attributed to CV versions yet.</td></tr>`;
|
|
994
|
-
} else {
|
|
995
|
-
cvTbody.innerHTML = cvRows.map(cv => {
|
|
996
|
-
const r = formatRateDisplay(cv.callbacks, cv.submitted);
|
|
997
|
-
return `<tr>
|
|
998
|
-
<td><strong>${esc(cv.label || cv.cv_version_id)}</strong></td>
|
|
999
|
-
<td>${esc(cv.kind || "unknown")}</td>
|
|
1000
|
-
<td>${cv.submitted}</td>
|
|
1001
|
-
<td>${cv.callbacks}</td>
|
|
1002
|
-
<td>${esc(r.text)}</td>
|
|
1003
|
-
</tr>`;
|
|
1004
|
-
}).join("");
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
const tvg = analyticsView.cv_performance?.tailored_vs_generic;
|
|
1008
|
-
const cvNote = document.getElementById("cv-tailored-note");
|
|
1009
|
-
if (tvg) {
|
|
1010
|
-
const tRate = formatRateDisplay(tvg.tailored.callbacks, tvg.tailored.submitted);
|
|
1011
|
-
const gRate = formatRateDisplay(tvg.generic.callbacks, tvg.generic.submitted);
|
|
1012
|
-
const compNote = tvg.comparable
|
|
1013
|
-
? "Both cohorts meet n ≥ 5."
|
|
1014
|
-
: `Not statistically comparable yet (requires n ≥ ${MIN_SAMPLE_SIZE} in both tailored and generic cohorts).`;
|
|
1015
|
-
cvNote.textContent = `Tailored: ${tvg.tailored.callbacks}/${tvg.tailored.submitted} (${tRate.text}) · Generic: ${tvg.generic.callbacks}/${tvg.generic.submitted} (${gRate.text}) · Unknown: ${tvg.unknown_count}. ${compNote}`;
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
// Platform & ATS Channel Yield Breakdown (MIN_N = 5 guarded)
|
|
1019
|
-
const byPlat = new Map();
|
|
1020
|
-
for (const r of submitted) {
|
|
1021
|
-
const key = normalizePlatform(r.platform);
|
|
1022
|
-
if (!byPlat.has(key)) byPlat.set(key, { submitted: 0, callbacks: 0, scores: [] });
|
|
1023
|
-
const entry = byPlat.get(key);
|
|
1024
|
-
entry.submitted++;
|
|
1025
|
-
if (hasPositiveCallback(r)) entry.callbacks++;
|
|
1026
|
-
const rawSc = r.match_score !== null && r.match_score !== undefined ? r.match_score : r.score;
|
|
1027
|
-
const sc = (rawSc === null || rawSc === undefined || rawSc === "") ? Number.NaN : Number(rawSc);
|
|
1028
|
-
if (Number.isFinite(sc) && sc > 0 && sc <= 10) entry.scores.push(sc);
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
const tbody = document.getElementById("yield-tbody");
|
|
1032
|
-
if (!byPlat.size) {
|
|
1033
|
-
tbody.innerHTML = `<tr><td colspan="6" style="color:var(--muted);text-align:center;">No submitted applications yet in local logs. Click "Load Synthetic Sample" above to preview the layout, or load a JSON file.</td></tr>`;
|
|
1034
|
-
} else {
|
|
1035
|
-
tbody.innerHTML = [...byPlat.entries()]
|
|
1036
|
-
.sort((a, b) => b[1].submitted - a[1].submitted)
|
|
1037
|
-
.map(([plat, stat]) => {
|
|
1038
|
-
const rateObj = formatRateDisplay(stat.callbacks, stat.submitted);
|
|
1039
|
-
const avg = stat.scores.length ? (stat.scores.reduce((x, y) => x + y, 0) / stat.scores.length).toFixed(1) : "—";
|
|
1040
|
-
const barWidth = rateObj.sufficient ? Math.min(100, rateObj.pct) : 0;
|
|
1041
|
-
const barClass = rateObj.sufficient ? "bar-fill" : "bar-fill insufficient";
|
|
1042
|
-
return `<tr>
|
|
1043
|
-
<td><strong>${esc(plat)}</strong></td>
|
|
1044
|
-
<td>${stat.submitted}</td>
|
|
1045
|
-
<td>${stat.callbacks}</td>
|
|
1046
|
-
<td>${esc(rateObj.text)}</td>
|
|
1047
|
-
<td>${esc(avg)}</td>
|
|
1048
|
-
<td><div class="bar-wrap"><div class="${barClass}" style="width:${barWidth}%"></div></div></td>
|
|
1049
|
-
</tr>`;
|
|
1050
|
-
}).join("");
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
document.getElementById("dismiss-error-btn").addEventListener("click", clearError);
|
|
1055
|
-
|
|
1056
|
-
document.getElementById("search-input").addEventListener("input", e => {
|
|
1057
|
-
render(activeRecords, e.target.value);
|
|
1058
|
-
});
|
|
1059
|
-
|
|
1060
|
-
document.getElementById("demo-btn").addEventListener("click", () => {
|
|
1061
|
-
clearError();
|
|
1062
|
-
activeRecords = SYNTHETIC_DEMO_DATA;
|
|
1063
|
-
dataMode = "sample";
|
|
1064
|
-
isCustomLoadedFile = false;
|
|
1065
|
-
sourceLabel = `Synthetic Sample Data (${SYNTHETIC_DEMO_DATA.length} fictional records)`;
|
|
1066
|
-
render(activeRecords, document.getElementById("search-input").value);
|
|
1067
|
-
});
|
|
1068
|
-
|
|
1069
|
-
document.getElementById("reset-btn").addEventListener("click", () => {
|
|
1070
|
-
clearError();
|
|
1071
|
-
activeRecords = initialLocal;
|
|
1072
|
-
dataMode = "local";
|
|
1073
|
-
isCustomLoadedFile = false;
|
|
1074
|
-
sourceLabel = `logs/applications-log.json (${initialLocal.length} record(s))`;
|
|
1075
|
-
render(activeRecords, document.getElementById("search-input").value);
|
|
1076
|
-
});
|
|
1077
|
-
|
|
1078
|
-
document.getElementById("file-input").addEventListener("change", e => {
|
|
1079
|
-
const file = e.target.files && e.target.files[0];
|
|
1080
|
-
if (!file) return;
|
|
1081
|
-
const reader = new FileReader();
|
|
1082
|
-
reader.onload = () => {
|
|
1083
|
-
try {
|
|
1084
|
-
const parsed = JSON.parse(String(reader.result || ""));
|
|
1085
|
-
const records = Array.isArray(parsed) ? parsed : (Array.isArray(parsed?.applications) ? parsed.applications : null);
|
|
1086
|
-
if (!records) {
|
|
1087
|
-
throw new Error("Expected a JSON array or an object with an 'applications' array.");
|
|
1088
|
-
}
|
|
1089
|
-
clearError();
|
|
1090
|
-
activeRecords = records;
|
|
1091
|
-
dataMode = "local";
|
|
1092
|
-
isCustomLoadedFile = true;
|
|
1093
|
-
sourceLabel = `${file.name} (${records.length} local record(s))`;
|
|
1094
|
-
render(activeRecords, document.getElementById("search-input").value);
|
|
1095
|
-
} catch (err) {
|
|
1096
|
-
showError(`Could not parse "${file.name}": ${err.message}`);
|
|
1097
|
-
}
|
|
1098
|
-
};
|
|
1099
|
-
reader.readAsText(file);
|
|
1100
|
-
e.target.value = "";
|
|
1101
|
-
});
|
|
1102
|
-
|
|
1103
|
-
render(activeRecords);
|
|
1104
|
-
</script>
|
|
1105
|
-
</body>
|
|
1106
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Veycraft — Local Career Intelligence Dashboard</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--bg: #070b14;
|
|
10
|
+
--panel: #0f172a;
|
|
11
|
+
--panel-alt: #162036;
|
|
12
|
+
--border: #24324d;
|
|
13
|
+
--text: #f1f5f9;
|
|
14
|
+
--muted: #94a3b8;
|
|
15
|
+
--accent: #10b981;
|
|
16
|
+
--accent-soft: rgba(16, 185, 129, 0.14);
|
|
17
|
+
--accent-blue: #38bdf8;
|
|
18
|
+
--blue-soft: rgba(56, 189, 248, 0.14);
|
|
19
|
+
--accent-amber: #f59e0b;
|
|
20
|
+
--amber-soft: rgba(245, 158, 11, 0.14);
|
|
21
|
+
--accent-red: #f87171;
|
|
22
|
+
--red-soft: rgba(248, 113, 113, 0.14);
|
|
23
|
+
--accent-purple: #a78bfa;
|
|
24
|
+
--purple-soft: rgba(167, 139, 250, 0.14);
|
|
25
|
+
}
|
|
26
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
27
|
+
body {
|
|
28
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
|
|
29
|
+
background: var(--bg);
|
|
30
|
+
color: var(--text);
|
|
31
|
+
line-height: 1.5;
|
|
32
|
+
padding: 24px 20px 40px;
|
|
33
|
+
}
|
|
34
|
+
.banner {
|
|
35
|
+
border-radius: 10px;
|
|
36
|
+
padding: 12px 16px;
|
|
37
|
+
font-size: 0.84rem;
|
|
38
|
+
margin-bottom: 18px;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 10px;
|
|
44
|
+
}
|
|
45
|
+
.banner-sample {
|
|
46
|
+
background: var(--amber-soft);
|
|
47
|
+
border: 1px solid rgba(245, 158, 11, 0.45);
|
|
48
|
+
color: #fde68a;
|
|
49
|
+
}
|
|
50
|
+
.banner-local {
|
|
51
|
+
background: var(--accent-soft);
|
|
52
|
+
border: 1px solid rgba(16, 185, 129, 0.4);
|
|
53
|
+
color: #a7f3d0;
|
|
54
|
+
}
|
|
55
|
+
.banner-error {
|
|
56
|
+
background: var(--red-soft);
|
|
57
|
+
border: 1px solid rgba(248, 113, 113, 0.45);
|
|
58
|
+
color: #fecaca;
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
.banner-error.visible { display: flex; }
|
|
62
|
+
.mode-pill {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
padding: 2px 9px;
|
|
65
|
+
border-radius: 999px;
|
|
66
|
+
font-size: 0.72rem;
|
|
67
|
+
font-weight: 700;
|
|
68
|
+
letter-spacing: 0.04em;
|
|
69
|
+
text-transform: uppercase;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
}
|
|
72
|
+
.mode-sample { background: rgba(245, 158, 11, 0.25); color: #fef3c7; border: 1px solid rgba(245, 158, 11, 0.5); }
|
|
73
|
+
.mode-local { background: rgba(16, 185, 129, 0.22); color: #d1fae5; border: 1px solid rgba(16, 185, 129, 0.45); }
|
|
74
|
+
header {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-wrap: wrap;
|
|
77
|
+
justify-content: space-between;
|
|
78
|
+
align-items: flex-start;
|
|
79
|
+
gap: 16px;
|
|
80
|
+
padding-bottom: 20px;
|
|
81
|
+
border-bottom: 1px solid var(--border);
|
|
82
|
+
margin-bottom: 24px;
|
|
83
|
+
}
|
|
84
|
+
.brand h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
|
|
85
|
+
.brand p { color: var(--muted); font-size: 0.86rem; }
|
|
86
|
+
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
|
|
87
|
+
.btn {
|
|
88
|
+
background: var(--panel-alt);
|
|
89
|
+
color: var(--text);
|
|
90
|
+
border: 1px solid var(--border);
|
|
91
|
+
padding: 8px 14px;
|
|
92
|
+
border-radius: 8px;
|
|
93
|
+
font-size: 0.825rem;
|
|
94
|
+
font-weight: 600;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
transition: background 0.15s, border-color 0.15s;
|
|
97
|
+
}
|
|
98
|
+
.btn:hover { background: #1e2d4b; border-color: var(--accent-blue); }
|
|
99
|
+
.btn-primary { background: #065f46; border-color: var(--accent); color: #ecfdf5; }
|
|
100
|
+
.btn-primary:hover { background: #047857; }
|
|
101
|
+
input[type="search"] {
|
|
102
|
+
background: var(--panel);
|
|
103
|
+
color: var(--text);
|
|
104
|
+
border: 1px solid var(--border);
|
|
105
|
+
padding: 8px 12px;
|
|
106
|
+
border-radius: 8px;
|
|
107
|
+
font-size: 0.825rem;
|
|
108
|
+
min-width: 220px;
|
|
109
|
+
}
|
|
110
|
+
.kpi-grid {
|
|
111
|
+
display: grid;
|
|
112
|
+
grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
|
|
113
|
+
gap: 14px;
|
|
114
|
+
margin-bottom: 28px;
|
|
115
|
+
}
|
|
116
|
+
.kpi-card {
|
|
117
|
+
background: var(--panel);
|
|
118
|
+
border: 1px solid var(--border);
|
|
119
|
+
border-radius: 12px;
|
|
120
|
+
padding: 16px 18px;
|
|
121
|
+
}
|
|
122
|
+
.kpi-label { color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
123
|
+
.kpi-value { font-size: 1.75rem; font-weight: 700; margin: 6px 0 4px; }
|
|
124
|
+
.kpi-value.muted-rate { font-size: 1.15rem; color: var(--muted); padding: 6px 0; }
|
|
125
|
+
.kpi-sub { color: var(--muted); font-size: 0.76rem; }
|
|
126
|
+
.section-title {
|
|
127
|
+
font-size: 1.05rem;
|
|
128
|
+
font-weight: 700;
|
|
129
|
+
margin-bottom: 14px;
|
|
130
|
+
display: flex;
|
|
131
|
+
flex-wrap: wrap;
|
|
132
|
+
justify-content: space-between;
|
|
133
|
+
align-items: center;
|
|
134
|
+
gap: 8px;
|
|
135
|
+
}
|
|
136
|
+
.section-note {
|
|
137
|
+
color: var(--muted);
|
|
138
|
+
font-size: 0.79rem;
|
|
139
|
+
font-weight: 400;
|
|
140
|
+
}
|
|
141
|
+
.kanban {
|
|
142
|
+
display: grid;
|
|
143
|
+
grid-template-columns: repeat(6, minmax(220px, 1fr));
|
|
144
|
+
gap: 14px;
|
|
145
|
+
overflow-x: auto;
|
|
146
|
+
padding-bottom: 12px;
|
|
147
|
+
margin-bottom: 28px;
|
|
148
|
+
}
|
|
149
|
+
.column {
|
|
150
|
+
background: var(--panel);
|
|
151
|
+
border: 1px solid var(--border);
|
|
152
|
+
border-radius: 12px;
|
|
153
|
+
padding: 14px;
|
|
154
|
+
min-height: 280px;
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-direction: column;
|
|
157
|
+
gap: 10px;
|
|
158
|
+
}
|
|
159
|
+
.column-silent { border-color: rgba(245, 158, 11, 0.35); }
|
|
160
|
+
.col-header {
|
|
161
|
+
display: flex;
|
|
162
|
+
justify-content: space-between;
|
|
163
|
+
align-items: center;
|
|
164
|
+
font-size: 0.84rem;
|
|
165
|
+
font-weight: 700;
|
|
166
|
+
padding-bottom: 10px;
|
|
167
|
+
border-bottom: 1px solid var(--border);
|
|
168
|
+
}
|
|
169
|
+
.badge {
|
|
170
|
+
padding: 2px 8px;
|
|
171
|
+
border-radius: 999px;
|
|
172
|
+
font-size: 0.75rem;
|
|
173
|
+
font-weight: 700;
|
|
174
|
+
background: var(--panel-alt);
|
|
175
|
+
color: var(--text);
|
|
176
|
+
}
|
|
177
|
+
.card {
|
|
178
|
+
background: var(--panel-alt);
|
|
179
|
+
border: 1px solid var(--border);
|
|
180
|
+
border-radius: 10px;
|
|
181
|
+
padding: 12px;
|
|
182
|
+
font-size: 0.82rem;
|
|
183
|
+
display: flex;
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
gap: 6px;
|
|
186
|
+
}
|
|
187
|
+
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
|
|
188
|
+
.card-pills { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
189
|
+
.mini-pill {
|
|
190
|
+
font-size: 0.68rem;
|
|
191
|
+
font-weight: 600;
|
|
192
|
+
padding: 1px 6px;
|
|
193
|
+
border-radius: 5px;
|
|
194
|
+
background: var(--blue-soft);
|
|
195
|
+
color: #bae6fd;
|
|
196
|
+
border: 1px solid rgba(56, 189, 248, 0.3);
|
|
197
|
+
}
|
|
198
|
+
.mini-pill.tailored {
|
|
199
|
+
background: var(--purple-soft);
|
|
200
|
+
color: #ddd6fe;
|
|
201
|
+
border-color: rgba(167, 139, 250, 0.35);
|
|
202
|
+
}
|
|
203
|
+
.mini-pill.muted {
|
|
204
|
+
background: rgba(148, 163, 184, 0.14);
|
|
205
|
+
color: #cbd5e1;
|
|
206
|
+
border-color: rgba(148, 163, 184, 0.3);
|
|
207
|
+
}
|
|
208
|
+
.sample-tag {
|
|
209
|
+
font-size: 0.66rem;
|
|
210
|
+
font-weight: 700;
|
|
211
|
+
text-transform: uppercase;
|
|
212
|
+
padding: 1px 6px;
|
|
213
|
+
border-radius: 4px;
|
|
214
|
+
background: var(--amber-soft);
|
|
215
|
+
color: #fcd34d;
|
|
216
|
+
border: 1px solid rgba(245, 158, 11, 0.35);
|
|
217
|
+
}
|
|
218
|
+
.card-title { font-weight: 700; color: #fff; font-size: 0.88rem; }
|
|
219
|
+
.card-company { color: #7dd3fc; font-weight: 600; }
|
|
220
|
+
.card-meta {
|
|
221
|
+
display: flex;
|
|
222
|
+
justify-content: space-between;
|
|
223
|
+
color: var(--muted);
|
|
224
|
+
font-size: 0.75rem;
|
|
225
|
+
}
|
|
226
|
+
.score-pill {
|
|
227
|
+
display: inline-block;
|
|
228
|
+
padding: 1px 7px;
|
|
229
|
+
border-radius: 6px;
|
|
230
|
+
font-weight: 700;
|
|
231
|
+
font-size: 0.72rem;
|
|
232
|
+
background: var(--accent-soft);
|
|
233
|
+
color: #6ee7b7;
|
|
234
|
+
border: 1px solid rgba(16, 185, 129, 0.35);
|
|
235
|
+
}
|
|
236
|
+
.card-notes {
|
|
237
|
+
color: var(--muted);
|
|
238
|
+
font-size: 0.74rem;
|
|
239
|
+
border-top: 1px dashed var(--border);
|
|
240
|
+
padding-top: 6px;
|
|
241
|
+
word-break: break-word;
|
|
242
|
+
}
|
|
243
|
+
.card a { color: var(--accent-blue); text-decoration: none; font-size: 0.75rem; }
|
|
244
|
+
.card a:hover { text-decoration: underline; }
|
|
245
|
+
.yield-panel {
|
|
246
|
+
background: var(--panel);
|
|
247
|
+
border: 1px solid var(--border);
|
|
248
|
+
border-radius: 12px;
|
|
249
|
+
padding: 20px;
|
|
250
|
+
margin-bottom: 24px;
|
|
251
|
+
}
|
|
252
|
+
.two-col {
|
|
253
|
+
display: grid;
|
|
254
|
+
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
|
255
|
+
gap: 20px;
|
|
256
|
+
margin-bottom: 24px;
|
|
257
|
+
}
|
|
258
|
+
.two-col .yield-panel { margin-bottom: 0; }
|
|
259
|
+
.aging-grid {
|
|
260
|
+
display: grid;
|
|
261
|
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
262
|
+
gap: 10px;
|
|
263
|
+
margin-bottom: 16px;
|
|
264
|
+
}
|
|
265
|
+
.aging-box {
|
|
266
|
+
background: var(--panel-alt);
|
|
267
|
+
border: 1px solid var(--border);
|
|
268
|
+
border-radius: 8px;
|
|
269
|
+
padding: 10px 12px;
|
|
270
|
+
}
|
|
271
|
+
.aging-box .aging-label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }
|
|
272
|
+
.aging-box .aging-val { font-size: 1.35rem; font-weight: 700; margin-top: 2px; }
|
|
273
|
+
.callout {
|
|
274
|
+
background: var(--panel-alt);
|
|
275
|
+
border: 1px solid var(--border);
|
|
276
|
+
border-radius: 8px;
|
|
277
|
+
padding: 10px 12px;
|
|
278
|
+
font-size: 0.8rem;
|
|
279
|
+
color: var(--muted);
|
|
280
|
+
margin-top: 12px;
|
|
281
|
+
}
|
|
282
|
+
.table-wrap { overflow-x: auto; }
|
|
283
|
+
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 520px; }
|
|
284
|
+
th, td {
|
|
285
|
+
text-align: left;
|
|
286
|
+
padding: 10px 12px;
|
|
287
|
+
border-bottom: 1px solid var(--border);
|
|
288
|
+
}
|
|
289
|
+
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 0.74rem; }
|
|
290
|
+
.bar-wrap {
|
|
291
|
+
width: 100%;
|
|
292
|
+
max-width: 160px;
|
|
293
|
+
background: var(--bg);
|
|
294
|
+
height: 8px;
|
|
295
|
+
border-radius: 999px;
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
}
|
|
298
|
+
.bar-fill { height: 100%; background: var(--accent); }
|
|
299
|
+
.bar-fill.insufficient { background: var(--border); }
|
|
300
|
+
.empty-msg { color: var(--muted); font-size: 0.8rem; text-align: center; margin-top: 24px; }
|
|
301
|
+
footer { color: var(--muted); font-size: 0.78rem; text-align: center; margin-top: 20px; }
|
|
302
|
+
@media (max-width: 768px) {
|
|
303
|
+
body { padding: 16px 12px 32px; }
|
|
304
|
+
input[type="search"] { min-width: 0; width: 100%; }
|
|
305
|
+
.controls { width: 100%; }
|
|
306
|
+
.kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
307
|
+
.brand p, .banner { overflow-wrap: anywhere; }
|
|
308
|
+
}
|
|
309
|
+
@media (max-width: 520px) {
|
|
310
|
+
.kpi-grid { grid-template-columns: 1fr; }
|
|
311
|
+
}
|
|
312
|
+
</style>
|
|
313
|
+
</head>
|
|
314
|
+
<body>
|
|
315
|
+
<div id="data-banner" class="banner banner-local" role="status">
|
|
316
|
+
<div id="data-banner-text">
|
|
317
|
+
<strong>LOCAL USER RECORDS MODE (READ-ONLY):</strong> Displaying records from your local <code>logs/applications-log.json</code> (zero uploads, zero telemetry, zero ledger writes).
|
|
318
|
+
</div>
|
|
319
|
+
<span id="mode-pill" class="mode-pill mode-local">Local User Data</span>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<div id="error-banner" class="banner banner-error" role="alert">
|
|
323
|
+
<span id="error-banner-text"></span>
|
|
324
|
+
<button type="button" class="btn" id="dismiss-error-btn">Dismiss</button>
|
|
325
|
+
</div>
|
|
326
|
+
|
|
327
|
+
<header>
|
|
328
|
+
<div class="brand">
|
|
329
|
+
<h1>Veycraft — Local Career Intelligence & Pipeline</h1>
|
|
330
|
+
<p>100% Local Zero-Server Read-Only Dashboard · Source: <code id="source-label">logs/applications-log.json</code></p>
|
|
331
|
+
</div>
|
|
332
|
+
<div class="controls">
|
|
333
|
+
<input type="search" id="search-input" aria-label="Filter applications" placeholder="Filter company, role, platform, CV..." />
|
|
334
|
+
<label class="btn">
|
|
335
|
+
Load Local JSON File
|
|
336
|
+
<input type="file" id="file-input" accept=".json" style="display:none" />
|
|
337
|
+
</label>
|
|
338
|
+
<button class="btn btn-primary" id="demo-btn" type="button">Load Synthetic Sample</button>
|
|
339
|
+
<button class="btn" id="reset-btn" type="button">Reset to Local Logs</button>
|
|
340
|
+
</div>
|
|
341
|
+
</header>
|
|
342
|
+
|
|
343
|
+
<section class="kpi-grid">
|
|
344
|
+
<div class="kpi-card">
|
|
345
|
+
<div class="kpi-label">Total Submitted</div>
|
|
346
|
+
<div class="kpi-value" id="kpi-applied">0</div>
|
|
347
|
+
<div class="kpi-sub" id="kpi-applied-sub">0 non-submitted records excluded</div>
|
|
348
|
+
</div>
|
|
349
|
+
<div class="kpi-card">
|
|
350
|
+
<div class="kpi-label">Callback Rate %</div>
|
|
351
|
+
<div class="kpi-value" id="kpi-callback">n/a (n < 5)</div>
|
|
352
|
+
<div class="kpi-sub" id="kpi-callback-sub">Requires n ≥ 5 submitted applications</div>
|
|
353
|
+
</div>
|
|
354
|
+
<div class="kpi-card">
|
|
355
|
+
<div class="kpi-label">Avg Match Score</div>
|
|
356
|
+
<div class="kpi-value" id="kpi-score">—</div>
|
|
357
|
+
<div class="kpi-sub" id="kpi-score-sub">Scale 1–10 across displayed records</div>
|
|
358
|
+
</div>
|
|
359
|
+
<div class="kpi-card">
|
|
360
|
+
<div class="kpi-label">Active Pipeline</div>
|
|
361
|
+
<div class="kpi-value" id="kpi-active">0</div>
|
|
362
|
+
<div class="kpi-sub" id="kpi-active-sub">Applied (<14d), Interview, Assessment & Offer</div>
|
|
363
|
+
</div>
|
|
364
|
+
<div class="kpi-card">
|
|
365
|
+
<div class="kpi-label">Silent (≥14d)</div>
|
|
366
|
+
<div class="kpi-value" id="kpi-silent">0</div>
|
|
367
|
+
<div class="kpi-sub" id="kpi-silent-sub">No response ≥14d — never counted as rejected</div>
|
|
368
|
+
</div>
|
|
369
|
+
<div class="kpi-card">
|
|
370
|
+
<div class="kpi-label">Follow-Up Overdue</div>
|
|
371
|
+
<div class="kpi-value" id="kpi-overdue">0</div>
|
|
372
|
+
<div class="kpi-sub" id="kpi-overdue-sub">Applied ≥7d without logged follow-up</div>
|
|
373
|
+
</div>
|
|
374
|
+
</section>
|
|
375
|
+
|
|
376
|
+
<div class="section-title">
|
|
377
|
+
<span>Application Lifecycle Kanban</span>
|
|
378
|
+
<span class="section-note">Applied roles ≥14 days without update surface separately in Silent (≥14d) — never classified as rejected</span>
|
|
379
|
+
</div>
|
|
380
|
+
<section class="kanban" id="kanban-board"></section>
|
|
381
|
+
|
|
382
|
+
<div class="two-col">
|
|
383
|
+
<section class="yield-panel">
|
|
384
|
+
<div class="section-title">
|
|
385
|
+
<span>Aging Buckets & Response Timing</span>
|
|
386
|
+
<span class="section-note" id="timing-sample-note">Deterministic timestamps only</span>
|
|
387
|
+
</div>
|
|
388
|
+
<div class="aging-grid" id="aging-grid"></div>
|
|
389
|
+
<div class="callout" id="response-timing-summary"></div>
|
|
390
|
+
<div class="table-wrap" style="margin-top: 14px;">
|
|
391
|
+
<table>
|
|
392
|
+
<thead>
|
|
393
|
+
<tr>
|
|
394
|
+
<th>Overdue Follow-Up (≥7d)</th>
|
|
395
|
+
<th>Role</th>
|
|
396
|
+
<th>Platform</th>
|
|
397
|
+
<th>Applied</th>
|
|
398
|
+
<th>Days</th>
|
|
399
|
+
</tr>
|
|
400
|
+
</thead>
|
|
401
|
+
<tbody id="overdue-tbody"></tbody>
|
|
402
|
+
</table>
|
|
403
|
+
</div>
|
|
404
|
+
</section>
|
|
405
|
+
|
|
406
|
+
<section class="yield-panel">
|
|
407
|
+
<div class="section-title">
|
|
408
|
+
<span>CV Version Performance</span>
|
|
409
|
+
<span class="section-note">Owner CVs only · rates require n ≥ 5</span>
|
|
410
|
+
</div>
|
|
411
|
+
<div class="table-wrap">
|
|
412
|
+
<table>
|
|
413
|
+
<thead>
|
|
414
|
+
<tr>
|
|
415
|
+
<th>CV Version</th>
|
|
416
|
+
<th>Kind</th>
|
|
417
|
+
<th>Submitted</th>
|
|
418
|
+
<th>Callbacks</th>
|
|
419
|
+
<th>Callback Rate</th>
|
|
420
|
+
</tr>
|
|
421
|
+
</thead>
|
|
422
|
+
<tbody id="cv-tbody"></tbody>
|
|
423
|
+
</table>
|
|
424
|
+
</div>
|
|
425
|
+
<div class="callout" id="cv-tailored-note"></div>
|
|
426
|
+
</section>
|
|
427
|
+
</div>
|
|
428
|
+
|
|
429
|
+
<section class="yield-panel">
|
|
430
|
+
<div class="section-title">
|
|
431
|
+
<span>Platform & ATS Channel Yield Breakdown</span>
|
|
432
|
+
<span class="section-note">Minimum sample size n ≥ 5 required for conversion percentages</span>
|
|
433
|
+
</div>
|
|
434
|
+
<div class="table-wrap">
|
|
435
|
+
<table>
|
|
436
|
+
<thead>
|
|
437
|
+
<tr>
|
|
438
|
+
<th>Platform / Channel</th>
|
|
439
|
+
<th>Submitted</th>
|
|
440
|
+
<th>Callbacks</th>
|
|
441
|
+
<th>Callback Rate</th>
|
|
442
|
+
<th>Avg Match Score</th>
|
|
443
|
+
<th>Conversion Bar</th>
|
|
444
|
+
</tr>
|
|
445
|
+
</thead>
|
|
446
|
+
<tbody id="yield-tbody"></tbody>
|
|
447
|
+
</table>
|
|
448
|
+
</div>
|
|
449
|
+
<div class="callout" id="platform-humility-note">
|
|
450
|
+
Observational platform/channel differences reflect sample history only and do not establish ATS bias or causation.
|
|
451
|
+
</div>
|
|
452
|
+
</section>
|
|
453
|
+
|
|
454
|
+
<footer>
|
|
455
|
+
Generated locally by <code>veycraft</code> — Deterministic factual metrics only · Zero telemetry, zero external servers, zero ledger mutations.
|
|
456
|
+
</footer>
|
|
457
|
+
|
|
458
|
+
<script>
|
|
459
|
+
// Injected by `veycraft dashboard`
|
|
460
|
+
window.__JOB_HUNTER_LOGS__ = /*__APPLICATIONS_DATA__*/[];
|
|
461
|
+
window.__VEYCRAFT_ANALYTICS__ = /*__CAREER_ANALYTICS__*/null;
|
|
462
|
+
|
|
463
|
+
const MIN_SAMPLE_SIZE = 5;
|
|
464
|
+
const DAY_MS = 86400000;
|
|
465
|
+
|
|
466
|
+
const SYNTHETIC_DEMO_DATA = [
|
|
467
|
+
{
|
|
468
|
+
job_id: "sample-linkedin-40991823",
|
|
469
|
+
company: "CloudScale Payments (Synthetic)",
|
|
470
|
+
role: "Senior Full-Stack AI Engineer",
|
|
471
|
+
platform: "linkedin",
|
|
472
|
+
status: "interview",
|
|
473
|
+
match_score: 9.0,
|
|
474
|
+
cv_version_id: "cv-tailored-sample-01",
|
|
475
|
+
cv_tailoring: { is_tailored: true },
|
|
476
|
+
interviews: [{ interview_id: "int-sample-1", round: 1, stage: "recruiter_screen", status: "scheduled" }],
|
|
477
|
+
applied_at: new Date(Date.now() - 4 * DAY_MS).toISOString(),
|
|
478
|
+
updated_at: new Date(Date.now() - 2 * DAY_MS).toISOString(),
|
|
479
|
+
url: "https://example.invalid/jobs/40991823",
|
|
480
|
+
notes: "[Synthetic sample] Recruiter screen booked; tailored TypeScript + Playwright bullets."
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
job_id: "sample-greenhouse-8812",
|
|
484
|
+
company: "FinCore Infrastructure (Synthetic)",
|
|
485
|
+
role: "Staff Backend Engineer (Node.js)",
|
|
486
|
+
platform: "greenhouse",
|
|
487
|
+
status: "assessment",
|
|
488
|
+
match_score: 8.6,
|
|
489
|
+
cv_version_id: "cv-tailored-sample-01",
|
|
490
|
+
cv_tailoring: { is_tailored: true },
|
|
491
|
+
assessments: [{ assessment_id: "asmt-sample-1", type: "system_design_doc", status: "in_progress" }],
|
|
492
|
+
applied_at: new Date(Date.now() - 6 * DAY_MS).toISOString(),
|
|
493
|
+
updated_at: new Date(Date.now() - 3 * DAY_MS).toISOString(),
|
|
494
|
+
url: "https://example.invalid/jobs/8812",
|
|
495
|
+
notes: "[Synthetic sample] System design review scheduled."
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
job_id: "sample-wellfound-9921",
|
|
499
|
+
company: "Agentic Labs (Synthetic)",
|
|
500
|
+
role: "Founding AI Systems Engineer",
|
|
501
|
+
platform: "wellfound",
|
|
502
|
+
status: "offer",
|
|
503
|
+
match_score: 9.4,
|
|
504
|
+
cv_version_id: "cv-tailored-sample-01",
|
|
505
|
+
cv_tailoring: { is_tailored: true },
|
|
506
|
+
applied_at: new Date(Date.now() - 12 * DAY_MS).toISOString(),
|
|
507
|
+
updated_at: new Date(Date.now() - 5 * DAY_MS).toISOString(),
|
|
508
|
+
url: "https://example.invalid/jobs/9921",
|
|
509
|
+
notes: "[Synthetic sample] Fictional offer record for UI demonstration only (not a real outcome)."
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
job_id: "sample-wuzzuf-7710",
|
|
513
|
+
company: "NilePay Tech (Synthetic)",
|
|
514
|
+
role: "Senior Frontend Engineer",
|
|
515
|
+
platform: "wuzzuf",
|
|
516
|
+
status: "applied",
|
|
517
|
+
match_score: 8.1,
|
|
518
|
+
cv_version_id: "cv-base-sample-01",
|
|
519
|
+
cv_tailoring: { is_tailored: false },
|
|
520
|
+
applied_at: new Date(Date.now() - 9 * DAY_MS).toISOString(),
|
|
521
|
+
url: "https://example.invalid/jobs/7710",
|
|
522
|
+
notes: "[Synthetic sample] Confirmation snapshot recorded; Day 7 follow-up window active."
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
job_id: "sample-ashby-5520",
|
|
526
|
+
company: "SignalStack Systems (Synthetic)",
|
|
527
|
+
role: "Backend Platform Engineer",
|
|
528
|
+
platform: "ashby",
|
|
529
|
+
status: "applied",
|
|
530
|
+
match_score: 7.9,
|
|
531
|
+
cv_version_id: "cv-base-sample-01",
|
|
532
|
+
cv_tailoring: { is_tailored: false },
|
|
533
|
+
applied_at: new Date(Date.now() - 19 * DAY_MS).toISOString(),
|
|
534
|
+
url: "https://example.invalid/jobs/5520",
|
|
535
|
+
notes: "[Synthetic sample] No response yet after 19 days — displayed in Silent (>=14d), never as rejected."
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
job_id: "sample-lever-3319",
|
|
539
|
+
company: "OrbitMesh Cloud (Synthetic)",
|
|
540
|
+
role: "Platform Engineer",
|
|
541
|
+
platform: "lever",
|
|
542
|
+
status: "rejected",
|
|
543
|
+
match_score: 7.2,
|
|
544
|
+
cv_version_id: "cv-base-sample-01",
|
|
545
|
+
cv_tailoring: { is_tailored: false },
|
|
546
|
+
applied_at: new Date(Date.now() - 18 * DAY_MS).toISOString(),
|
|
547
|
+
updated_at: new Date(Date.now() - 11 * DAY_MS).toISOString(),
|
|
548
|
+
url: "https://example.invalid/jobs/3319",
|
|
549
|
+
notes: "[Synthetic sample] Confirmed closed requisition; Kubernetes multi-region gap noted."
|
|
550
|
+
}
|
|
551
|
+
];
|
|
552
|
+
|
|
553
|
+
const COLUMNS = [
|
|
554
|
+
{ key: "applied", title: "Applied (<14d)" },
|
|
555
|
+
{ key: "interview", title: "Interviewing" },
|
|
556
|
+
{ key: "assessment", title: "Technical Assessment" },
|
|
557
|
+
{ key: "offer", title: "Offer" },
|
|
558
|
+
{ key: "silent14d", title: "Silent (≥14d)", className: "column-silent" },
|
|
559
|
+
{ key: "rejected", title: "Rejected / Withdrawn" }
|
|
560
|
+
];
|
|
561
|
+
|
|
562
|
+
const initialLocal = Array.isArray(window.__JOB_HUNTER_LOGS__) ? window.__JOB_HUNTER_LOGS__ : [];
|
|
563
|
+
const injectedAnalytics = (window.__VEYCRAFT_ANALYTICS__ && typeof window.__VEYCRAFT_ANALYTICS__ === "object")
|
|
564
|
+
? window.__VEYCRAFT_ANALYTICS__
|
|
565
|
+
: null;
|
|
566
|
+
|
|
567
|
+
let activeRecords = initialLocal;
|
|
568
|
+
let dataMode = "local";
|
|
569
|
+
let sourceLabel = `logs/applications-log.json (${initialLocal.length} record(s))`;
|
|
570
|
+
let isCustomLoadedFile = false;
|
|
571
|
+
|
|
572
|
+
function showError(msg) {
|
|
573
|
+
const box = document.getElementById("error-banner");
|
|
574
|
+
document.getElementById("error-banner-text").textContent = msg;
|
|
575
|
+
box.classList.add("visible");
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
function clearError() {
|
|
579
|
+
document.getElementById("error-banner").classList.remove("visible");
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
function updateSourceBanner() {
|
|
583
|
+
const banner = document.getElementById("data-banner");
|
|
584
|
+
const text = document.getElementById("data-banner-text");
|
|
585
|
+
const pill = document.getElementById("mode-pill");
|
|
586
|
+
document.getElementById("source-label").textContent = sourceLabel;
|
|
587
|
+
|
|
588
|
+
if (dataMode === "sample") {
|
|
589
|
+
banner.className = "banner banner-sample";
|
|
590
|
+
text.innerHTML = '<strong>SYNTHETIC SAMPLE DATA ACTIVE:</strong> All companies, interviews, offers, and metrics below are fictional sample records for UI preview only — <strong>not</strong> real user or project outcomes. Click "Reset to Local Logs" or load your own JSON file.';
|
|
591
|
+
pill.className = "mode-pill mode-sample";
|
|
592
|
+
pill.textContent = "Synthetic Sample";
|
|
593
|
+
} else {
|
|
594
|
+
banner.className = "banner banner-local";
|
|
595
|
+
text.innerHTML = '<strong>LOCAL USER RECORDS MODE (READ-ONLY):</strong> Displaying records loaded strictly on your machine from local JSON (zero uploads, zero telemetry, zero ledger writes).';
|
|
596
|
+
pill.className = "mode-pill mode-local";
|
|
597
|
+
pill.textContent = "Local User Data";
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
const CANONICAL_STATUS_SET = new Set([
|
|
602
|
+
"discovered", "prepared", "dry_run", "skipped", "needs_review", "failed", "aborted",
|
|
603
|
+
"applied", "interview", "assessment", "offer", "rejected", "withdrawn"
|
|
604
|
+
]);
|
|
605
|
+
const LEGACY_STATUS_MAP = {
|
|
606
|
+
new: "discovered",
|
|
607
|
+
scanned: "discovered",
|
|
608
|
+
ready: "prepared",
|
|
609
|
+
tailored: "prepared",
|
|
610
|
+
"dry-run": "dry_run",
|
|
611
|
+
filtered: "skipped",
|
|
612
|
+
ghost: "skipped",
|
|
613
|
+
blacklisted: "skipped",
|
|
614
|
+
pending_review: "needs_review",
|
|
615
|
+
manual_apply: "needs_review",
|
|
616
|
+
error: "failed",
|
|
617
|
+
stopped: "aborted",
|
|
618
|
+
submitted: "applied",
|
|
619
|
+
interviewing: "interview",
|
|
620
|
+
screen: "interview",
|
|
621
|
+
responded: "interview",
|
|
622
|
+
phone_screen: "interview",
|
|
623
|
+
take_home: "assessment",
|
|
624
|
+
challenge: "assessment",
|
|
625
|
+
coding_test: "assessment",
|
|
626
|
+
hired: "offer",
|
|
627
|
+
accepted: "offer",
|
|
628
|
+
offer_received: "offer",
|
|
629
|
+
declined: "rejected",
|
|
630
|
+
closed: "rejected",
|
|
631
|
+
withdraw: "withdrawn"
|
|
632
|
+
};
|
|
633
|
+
const EMPLOYER_RESPONSE_STATUS_SET = new Set(["interview", "assessment", "offer", "rejected"]);
|
|
634
|
+
|
|
635
|
+
function canonicalStatus(raw) {
|
|
636
|
+
if (typeof raw !== "string") return "unknown";
|
|
637
|
+
const s = raw.trim().toLowerCase();
|
|
638
|
+
if (CANONICAL_STATUS_SET.has(s)) return s;
|
|
639
|
+
if (Object.prototype.hasOwnProperty.call(LEGACY_STATUS_MAP, s)) return LEGACY_STATUS_MAP[s];
|
|
640
|
+
return "unknown";
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
function classifyBucket(rec, refNowTs = Date.now()) {
|
|
644
|
+
if (!rec || typeof rec !== "object" || rec.provenance?.third_party_subject === true) return "excluded";
|
|
645
|
+
if (rec.submission_uncertain === true) return "excluded";
|
|
646
|
+
const s = canonicalStatus(rec.status);
|
|
647
|
+
if (["dry_run", "prepared", "skipped", "needs_review", "discovered", "failed", "aborted", "unknown"].includes(s)) {
|
|
648
|
+
return "excluded";
|
|
649
|
+
}
|
|
650
|
+
if (s === "offer") return "offer";
|
|
651
|
+
if (s === "assessment") return "assessment";
|
|
652
|
+
if (s === "interview") return "interview";
|
|
653
|
+
if (s === "rejected" || s === "withdrawn") return "rejected";
|
|
654
|
+
if (s === "applied") {
|
|
655
|
+
const ts = Date.parse(rec.applied_at || rec.date || "");
|
|
656
|
+
if (!Number.isNaN(ts) && Math.floor((refNowTs - ts) / DAY_MS) >= 14) return "silent14d";
|
|
657
|
+
return "applied";
|
|
658
|
+
}
|
|
659
|
+
return "excluded";
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
function normalizePlatform(raw) {
|
|
663
|
+
const p = String(raw || "other").trim().toLowerCase();
|
|
664
|
+
if (p.includes("linkedin")) return "LinkedIn";
|
|
665
|
+
if (p.includes("wellfound") || p.includes("angellist")) return "Wellfound";
|
|
666
|
+
if (p.includes("wuzzuf") || p.includes("bayt")) return "Wuzzuf / MENA";
|
|
667
|
+
if (["greenhouse", "lever", "ashby", "workday", "smartrecruiters", "breezyhr", "taleo", "workable"].some(k => p.includes(k))) {
|
|
668
|
+
return "Direct ATS (" + p + ")";
|
|
669
|
+
}
|
|
670
|
+
return raw || "Other";
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
function formatRateDisplay(numerator, denominator) {
|
|
674
|
+
if (denominator < MIN_SAMPLE_SIZE) {
|
|
675
|
+
return { text: `n/a (n=${denominator} < ${MIN_SAMPLE_SIZE})`, pct: null, sufficient: false };
|
|
676
|
+
}
|
|
677
|
+
const pct = ((numerator / denominator) * 100).toFixed(1);
|
|
678
|
+
return { text: `${pct}%`, pct: Number(pct), sufficient: true };
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
function quantileSorted(sorted, q) {
|
|
682
|
+
if (!sorted.length) return null;
|
|
683
|
+
if (sorted.length === 1) return Math.round(sorted[0] * 10) / 10;
|
|
684
|
+
const pos = (sorted.length - 1) * q;
|
|
685
|
+
const base = Math.floor(pos);
|
|
686
|
+
const rest = pos - base;
|
|
687
|
+
const val = sorted[base + 1] !== undefined
|
|
688
|
+
? sorted[base] + rest * (sorted[base + 1] - sorted[base])
|
|
689
|
+
: sorted[base];
|
|
690
|
+
return Math.round(val * 10) / 10;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
function hasPositiveCallback(rec) {
|
|
694
|
+
const st = canonicalStatus(rec.status);
|
|
695
|
+
const hist = Array.isArray(rec.stage_history) ? rec.stage_history.map(e => e?.to_status) : [];
|
|
696
|
+
const everInt = st === "interview" || (Array.isArray(rec.interviews) && rec.interviews.length > 0) || hist.includes("interview");
|
|
697
|
+
const everAsmt = st === "assessment" || (Array.isArray(rec.assessments) && rec.assessments.length > 0) || hist.includes("assessment");
|
|
698
|
+
const hasOffer = st === "offer" || hist.includes("offer");
|
|
699
|
+
return everInt || everAsmt || hasOffer;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
function computeClientAnalytics(records, refNowTs = Date.now()) {
|
|
703
|
+
const nowTs = refNowTs;
|
|
704
|
+
const aging = { fresh_0_6d: 0, followup_window_7_13d: 0, silent_14_29d: 0, stale_30d_plus: 0, unknown_applied_date: 0 };
|
|
705
|
+
const overdue = [];
|
|
706
|
+
const responseDeltas = [];
|
|
707
|
+
const cvMap = new Map();
|
|
708
|
+
const tailored = { submitted: 0, callbacks: 0 };
|
|
709
|
+
const generic = { submitted: 0, callbacks: 0 };
|
|
710
|
+
let unknownTailoring = 0;
|
|
711
|
+
|
|
712
|
+
for (const r of records) {
|
|
713
|
+
const b = classifyBucket(r, nowTs);
|
|
714
|
+
if (b === "excluded") continue;
|
|
715
|
+
const st = canonicalStatus(r.status);
|
|
716
|
+
const isCallback = hasPositiveCallback(r);
|
|
717
|
+
|
|
718
|
+
const appliedTs = Date.parse(r.applied_at || r.date || "");
|
|
719
|
+
const ageDays = Number.isNaN(appliedTs) ? null : Math.floor((nowTs - appliedTs) / DAY_MS);
|
|
720
|
+
|
|
721
|
+
if (st === "applied") {
|
|
722
|
+
if (ageDays === null || ageDays < 0) aging.unknown_applied_date++;
|
|
723
|
+
else if (ageDays < 7) aging.fresh_0_6d++;
|
|
724
|
+
else if (ageDays < 14) aging.followup_window_7_13d++;
|
|
725
|
+
else if (ageDays < 30) aging.silent_14_29d++;
|
|
726
|
+
else aging.stale_30d_plus++;
|
|
727
|
+
|
|
728
|
+
const notesStr = typeof r.notes === "string" ? r.notes : "";
|
|
729
|
+
const alreadyFollowedUp = Boolean(r.follow_up?.last_followed_up_at) || /followup_sent:/i.test(notesStr);
|
|
730
|
+
if (ageDays !== null && ageDays >= 7 && !alreadyFollowedUp) {
|
|
731
|
+
overdue.push({
|
|
732
|
+
job_id: r.job_id || null,
|
|
733
|
+
company: r.company || "Unknown Company",
|
|
734
|
+
title: r.title || r.role || "Untitled Role",
|
|
735
|
+
platform: r.platform || "direct",
|
|
736
|
+
applied_at: r.applied_at || r.date || "",
|
|
737
|
+
days_since_applied: ageDays
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
if (!Number.isNaN(appliedTs)) {
|
|
743
|
+
const candidates = [];
|
|
744
|
+
if (Array.isArray(r.stage_history)) {
|
|
745
|
+
for (const ev of r.stage_history) {
|
|
746
|
+
const evSt = canonicalStatus(ev?.to_status);
|
|
747
|
+
if (EMPLOYER_RESPONSE_STATUS_SET.has(evSt)) {
|
|
748
|
+
const t = Date.parse(ev.at || "");
|
|
749
|
+
if (!Number.isNaN(t)) candidates.push(t);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
if (Array.isArray(r.interviews)) {
|
|
754
|
+
for (const iv of r.interviews) {
|
|
755
|
+
if (iv && iv.scheduled_at) {
|
|
756
|
+
const t = Date.parse(iv.scheduled_at);
|
|
757
|
+
if (!Number.isNaN(t)) candidates.push(t);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
if (Array.isArray(r.assessments)) {
|
|
762
|
+
for (const asmt of r.assessments) {
|
|
763
|
+
if (asmt && asmt.received_at) {
|
|
764
|
+
const t = Date.parse(asmt.received_at);
|
|
765
|
+
if (!Number.isNaN(t)) candidates.push(t);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
if (!candidates.length && EMPLOYER_RESPONSE_STATUS_SET.has(st) && r.updated_at) {
|
|
770
|
+
const t = Date.parse(r.updated_at);
|
|
771
|
+
if (!Number.isNaN(t)) candidates.push(t);
|
|
772
|
+
}
|
|
773
|
+
const valid = candidates.filter(t => t >= appliedTs).sort((a, c) => a - c);
|
|
774
|
+
if (valid.length) responseDeltas.push((valid[0] - appliedTs) / DAY_MS);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
const cvId = (typeof r.cv_version_id === "string" && r.cv_version_id.trim()) ? r.cv_version_id.trim() : "unattributed_legacy";
|
|
778
|
+
if (!cvMap.has(cvId)) {
|
|
779
|
+
cvMap.set(cvId, {
|
|
780
|
+
cv_version_id: cvId,
|
|
781
|
+
label: cvId === "unattributed_legacy" ? "Unattributed (Legacy / No CV Version Logged)" : cvId,
|
|
782
|
+
kind: typeof r.cv_tailoring?.is_tailored === "boolean" ? (r.cv_tailoring.is_tailored ? "tailored" : "generic") : "unknown",
|
|
783
|
+
submitted: 0,
|
|
784
|
+
callbacks: 0
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
const cvEntry = cvMap.get(cvId);
|
|
788
|
+
cvEntry.submitted++;
|
|
789
|
+
if (isCallback) cvEntry.callbacks++;
|
|
790
|
+
|
|
791
|
+
if (typeof r.cv_tailoring?.is_tailored === "boolean") {
|
|
792
|
+
const cohort = r.cv_tailoring.is_tailored ? tailored : generic;
|
|
793
|
+
cohort.submitted++;
|
|
794
|
+
if (isCallback) cohort.callbacks++;
|
|
795
|
+
} else {
|
|
796
|
+
unknownTailoring++;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
overdue.sort((a, b) => (b.days_since_applied - a.days_since_applied) || String(a.job_id || "").localeCompare(String(b.job_id || "")));
|
|
801
|
+
responseDeltas.sort((a, b) => a - b);
|
|
802
|
+
const rtSufficient = responseDeltas.length >= MIN_SAMPLE_SIZE;
|
|
803
|
+
|
|
804
|
+
return {
|
|
805
|
+
timing: {
|
|
806
|
+
aging_buckets: aging,
|
|
807
|
+
overdue_follow_ups: overdue,
|
|
808
|
+
response_time: {
|
|
809
|
+
sample_n: responseDeltas.length,
|
|
810
|
+
sample_sufficient: rtSufficient,
|
|
811
|
+
median_days: rtSufficient ? quantileSorted(responseDeltas, 0.5) : null,
|
|
812
|
+
p75_days: rtSufficient ? quantileSorted(responseDeltas, 0.75) : null
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
cv_performance: {
|
|
816
|
+
by_cv_version: [...cvMap.values()].sort((a, b) => (b.submitted - a.submitted) || a.cv_version_id.localeCompare(b.cv_version_id)),
|
|
817
|
+
tailored_vs_generic: {
|
|
818
|
+
tailored,
|
|
819
|
+
generic,
|
|
820
|
+
unknown_count: unknownTailoring,
|
|
821
|
+
comparable: tailored.submitted >= MIN_SAMPLE_SIZE && generic.submitted >= MIN_SAMPLE_SIZE
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
function esc(str) {
|
|
828
|
+
const d = document.createElement("div");
|
|
829
|
+
d.textContent = str == null ? "" : String(str);
|
|
830
|
+
return d.innerHTML;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
function safeHref(url) {
|
|
834
|
+
try {
|
|
835
|
+
const parsed = new URL(String(url));
|
|
836
|
+
if (parsed.protocol === "https:" || parsed.protocol === "http:") return parsed.href;
|
|
837
|
+
} catch { /* ignore */ }
|
|
838
|
+
return null;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
function render(records, filterText = "") {
|
|
842
|
+
updateSourceBanner();
|
|
843
|
+
const q = filterText.trim().toLowerCase();
|
|
844
|
+
const filtered = records.filter(r => {
|
|
845
|
+
if (!q) return true;
|
|
846
|
+
return [r.company, r.role, r.title, r.platform, r.status, r.notes, r.cv_version_id]
|
|
847
|
+
.some(v => String(v || "").toLowerCase().includes(q));
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
const useInjected = dataMode === "local" && !isCustomLoadedFile && !q && injectedAnalytics;
|
|
851
|
+
const parsedInjectedNow = useInjected && injectedAnalytics.computed_at ? Date.parse(injectedAnalytics.computed_at) : Number.NaN;
|
|
852
|
+
const refNowTs = !Number.isNaN(parsedInjectedNow) ? parsedInjectedNow : Date.now();
|
|
853
|
+
|
|
854
|
+
const buckets = { applied: [], interview: [], assessment: [], offer: [], silent14d: [], rejected: [], excluded: [] };
|
|
855
|
+
for (const r of filtered) {
|
|
856
|
+
buckets[classifyBucket(r, refNowTs)].push(r);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
const submitted = [
|
|
860
|
+
...buckets.applied,
|
|
861
|
+
...buckets.interview,
|
|
862
|
+
...buckets.assessment,
|
|
863
|
+
...buckets.offer,
|
|
864
|
+
...buckets.silent14d,
|
|
865
|
+
...buckets.rejected
|
|
866
|
+
];
|
|
867
|
+
const analyticsView = useInjected ? injectedAnalytics : computeClientAnalytics(filtered, refNowTs);
|
|
868
|
+
const submittedCount = useInjected ? analyticsView.funnel.submitted_count : submitted.length;
|
|
869
|
+
const excludedCount = useInjected ? analyticsView.funnel.excluded_non_submitted_count : buckets.excluded.length;
|
|
870
|
+
const callbacks = useInjected ? analyticsView.funnel.positive_callbacks_count : submitted.filter(hasPositiveCallback).length;
|
|
871
|
+
const silentCount = useInjected ? analyticsView.funnel.silent_14d_count : buckets.silent14d.length;
|
|
872
|
+
const activeCount = buckets.applied.length + buckets.interview.length + buckets.assessment.length + buckets.offer.length;
|
|
873
|
+
const cbRate = formatRateDisplay(callbacks, submittedCount);
|
|
874
|
+
|
|
875
|
+
const scores = filtered
|
|
876
|
+
.map(r => {
|
|
877
|
+
const raw = r.match_score !== null && r.match_score !== undefined ? r.match_score : r.score;
|
|
878
|
+
return (raw === null || raw === undefined || raw === "") ? Number.NaN : Number(raw);
|
|
879
|
+
})
|
|
880
|
+
.filter(n => Number.isFinite(n) && n > 0 && n <= 10);
|
|
881
|
+
const avgScore = useInjected
|
|
882
|
+
? (analyticsView.funnel.avg_match_score !== null && analyticsView.funnel.avg_match_score !== undefined ? analyticsView.funnel.avg_match_score.toFixed(1) : "—")
|
|
883
|
+
: (scores.length ? (scores.reduce((a, b) => a + b, 0) / scores.length).toFixed(1) : "—");
|
|
884
|
+
|
|
885
|
+
document.getElementById("kpi-applied").textContent = String(submittedCount);
|
|
886
|
+
document.getElementById("kpi-applied-sub").textContent = `${excludedCount} non-submitted / excluded record(s)`;
|
|
887
|
+
|
|
888
|
+
const cbEl = document.getElementById("kpi-callback");
|
|
889
|
+
cbEl.textContent = cbRate.text;
|
|
890
|
+
cbEl.className = cbRate.sufficient ? "kpi-value" : "kpi-value muted-rate";
|
|
891
|
+
document.getElementById("kpi-callback-sub").textContent = cbRate.sufficient
|
|
892
|
+
? `${callbacks} callback(s) across ${submittedCount} submitted`
|
|
893
|
+
: `${callbacks} callback(s) / ${submittedCount} submitted (min n=${MIN_SAMPLE_SIZE} required)`;
|
|
894
|
+
|
|
895
|
+
document.getElementById("kpi-score").textContent = avgScore;
|
|
896
|
+
document.getElementById("kpi-active").textContent = String(activeCount);
|
|
897
|
+
document.getElementById("kpi-silent").textContent = String(silentCount);
|
|
898
|
+
document.getElementById("kpi-overdue").textContent = String(analyticsView.timing.overdue_follow_ups.length);
|
|
899
|
+
|
|
900
|
+
// Kanban Board (6 columns — Silent >=14d strictly separated from Rejected / Withdrawn)
|
|
901
|
+
const board = document.getElementById("kanban-board");
|
|
902
|
+
board.innerHTML = COLUMNS.map(col => {
|
|
903
|
+
const items = buckets[col.key] || [];
|
|
904
|
+
const cardsHtml = items.length
|
|
905
|
+
? items.map(item => {
|
|
906
|
+
const role = item.role || item.title || "Untitled Role";
|
|
907
|
+
const score = item.match_score ?? item.score ?? "—";
|
|
908
|
+
const dateStr = (item.applied_at || item.date || "").slice(0, 10) || "n/a";
|
|
909
|
+
const href = item.url ? safeHref(item.url) : null;
|
|
910
|
+
const link = href && dataMode === "local"
|
|
911
|
+
? `<a href="${esc(href)}" target="_blank" rel="noopener noreferrer">Open posting ↗</a>`
|
|
912
|
+
: "";
|
|
913
|
+
const samplePill = dataMode === "sample" ? `<span class="sample-tag">Sample</span>` : "";
|
|
914
|
+
|
|
915
|
+
const v2Pills = [];
|
|
916
|
+
if (item.cv_version_id) v2Pills.push(`<span class="mini-pill">CV: ${esc(item.cv_version_id)}</span>`);
|
|
917
|
+
if (item.cv_tailoring?.is_tailored === true) v2Pills.push(`<span class="mini-pill tailored">Tailored</span>`);
|
|
918
|
+
else if (item.cv_tailoring?.is_tailored === false) v2Pills.push(`<span class="mini-pill muted">Generic</span>`);
|
|
919
|
+
if (Array.isArray(item.interviews) && item.interviews.length > 0) {
|
|
920
|
+
v2Pills.push(`<span class="mini-pill">Rounds: ${item.interviews.length}</span>`);
|
|
921
|
+
}
|
|
922
|
+
if (Array.isArray(item.assessments) && item.assessments.length > 0) {
|
|
923
|
+
v2Pills.push(`<span class="mini-pill">Assessments: ${item.assessments.length}</span>`);
|
|
924
|
+
}
|
|
925
|
+
if (canonicalStatus(item.status) === "withdrawn") {
|
|
926
|
+
v2Pills.push(`<span class="mini-pill muted">Withdrawn</span>`);
|
|
927
|
+
}
|
|
928
|
+
const pillsRow = v2Pills.length ? `<div class="card-pills">${v2Pills.join("")}</div>` : "";
|
|
929
|
+
|
|
930
|
+
return `<div class="card">
|
|
931
|
+
<div class="card-top">
|
|
932
|
+
<div class="card-company">${esc(item.company || "Unknown Company")}</div>
|
|
933
|
+
${samplePill}
|
|
934
|
+
</div>
|
|
935
|
+
<div class="card-title">${esc(role)}</div>
|
|
936
|
+
<div class="card-meta">
|
|
937
|
+
<span>${esc(item.platform || "direct")} · ${esc(dateStr)}</span>
|
|
938
|
+
<span class="score-pill">${esc(score)}/10</span>
|
|
939
|
+
</div>
|
|
940
|
+
${pillsRow}
|
|
941
|
+
${link}
|
|
942
|
+
${item.notes ? `<div class="card-notes">${esc(item.notes)}</div>` : ""}
|
|
943
|
+
</div>`;
|
|
944
|
+
}).join("")
|
|
945
|
+
: `<div class="empty-msg">No records in ${esc(col.title)}</div>`;
|
|
946
|
+
return `<div class="column ${col.className || ""}">
|
|
947
|
+
<div class="col-header">
|
|
948
|
+
<span>${esc(col.title)}</span>
|
|
949
|
+
<span class="badge">${items.length}</span>
|
|
950
|
+
</div>
|
|
951
|
+
${cardsHtml}
|
|
952
|
+
</div>`;
|
|
953
|
+
}).join("");
|
|
954
|
+
|
|
955
|
+
// Aging & Response Timing Panel
|
|
956
|
+
const aging = analyticsView.timing.aging_buckets;
|
|
957
|
+
document.getElementById("aging-grid").innerHTML = [
|
|
958
|
+
{ label: "0–6d Fresh", val: aging.fresh_0_6d },
|
|
959
|
+
{ label: "7–13d Follow-Up", val: aging.followup_window_7_13d },
|
|
960
|
+
{ label: "14–29d Silent", val: aging.silent_14_29d },
|
|
961
|
+
{ label: "30d+ Stale", val: aging.stale_30d_plus },
|
|
962
|
+
{ label: "Unknown Date", val: aging.unknown_applied_date }
|
|
963
|
+
].map(b => `<div class="aging-box"><div class="aging-label">${esc(b.label)}</div><div class="aging-val">${b.val}</div></div>`).join("");
|
|
964
|
+
|
|
965
|
+
const rt = analyticsView.timing.response_time;
|
|
966
|
+
const rtSummary = document.getElementById("response-timing-summary");
|
|
967
|
+
if (!rt || rt.sample_n === 0) {
|
|
968
|
+
rtSummary.textContent = "Response timing: no verified employer post-application response timestamps recorded yet.";
|
|
969
|
+
} else if (!rt.sample_sufficient || rt.median_days === null) {
|
|
970
|
+
rtSummary.textContent = `Observed time-to-first-response: n/a (sample n=${rt.sample_n} < ${MIN_SAMPLE_SIZE}; requires n ≥ ${MIN_SAMPLE_SIZE}).`;
|
|
971
|
+
} else {
|
|
972
|
+
rtSummary.textContent = `Observed time-to-first-response: median ${rt.median_days}d · P75 ${rt.p75_days}d (n=${rt.sample_n}).`;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
const overdueList = analyticsView.timing.overdue_follow_ups || [];
|
|
976
|
+
const overdueTbody = document.getElementById("overdue-tbody");
|
|
977
|
+
if (!overdueList.length) {
|
|
978
|
+
overdueTbody.innerHTML = `<tr><td colspan="5" style="color:var(--muted);text-align:center;">No overdue ≥7d follow-ups in the displayed set.</td></tr>`;
|
|
979
|
+
} else {
|
|
980
|
+
overdueTbody.innerHTML = overdueList.slice(0, 12).map(item => `<tr>
|
|
981
|
+
<td><strong>${esc(item.company || "Unknown")}</strong></td>
|
|
982
|
+
<td>${esc(item.title || "Untitled Role")}</td>
|
|
983
|
+
<td>${esc(item.platform || "direct")}</td>
|
|
984
|
+
<td>${esc((item.applied_at || "").slice(0, 10) || "n/a")}</td>
|
|
985
|
+
<td>${esc(item.days_since_applied)}d</td>
|
|
986
|
+
</tr>`).join("");
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
// CV Version Performance Panel
|
|
990
|
+
const cvRows = analyticsView.cv_performance?.by_cv_version || [];
|
|
991
|
+
const cvTbody = document.getElementById("cv-tbody");
|
|
992
|
+
if (!cvRows.length) {
|
|
993
|
+
cvTbody.innerHTML = `<tr><td colspan="5" style="color:var(--muted);text-align:center;">No submitted applications attributed to CV versions yet.</td></tr>`;
|
|
994
|
+
} else {
|
|
995
|
+
cvTbody.innerHTML = cvRows.map(cv => {
|
|
996
|
+
const r = formatRateDisplay(cv.callbacks, cv.submitted);
|
|
997
|
+
return `<tr>
|
|
998
|
+
<td><strong>${esc(cv.label || cv.cv_version_id)}</strong></td>
|
|
999
|
+
<td>${esc(cv.kind || "unknown")}</td>
|
|
1000
|
+
<td>${cv.submitted}</td>
|
|
1001
|
+
<td>${cv.callbacks}</td>
|
|
1002
|
+
<td>${esc(r.text)}</td>
|
|
1003
|
+
</tr>`;
|
|
1004
|
+
}).join("");
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
const tvg = analyticsView.cv_performance?.tailored_vs_generic;
|
|
1008
|
+
const cvNote = document.getElementById("cv-tailored-note");
|
|
1009
|
+
if (tvg) {
|
|
1010
|
+
const tRate = formatRateDisplay(tvg.tailored.callbacks, tvg.tailored.submitted);
|
|
1011
|
+
const gRate = formatRateDisplay(tvg.generic.callbacks, tvg.generic.submitted);
|
|
1012
|
+
const compNote = tvg.comparable
|
|
1013
|
+
? "Both cohorts meet n ≥ 5."
|
|
1014
|
+
: `Not statistically comparable yet (requires n ≥ ${MIN_SAMPLE_SIZE} in both tailored and generic cohorts).`;
|
|
1015
|
+
cvNote.textContent = `Tailored: ${tvg.tailored.callbacks}/${tvg.tailored.submitted} (${tRate.text}) · Generic: ${tvg.generic.callbacks}/${tvg.generic.submitted} (${gRate.text}) · Unknown: ${tvg.unknown_count}. ${compNote}`;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
// Platform & ATS Channel Yield Breakdown (MIN_N = 5 guarded)
|
|
1019
|
+
const byPlat = new Map();
|
|
1020
|
+
for (const r of submitted) {
|
|
1021
|
+
const key = normalizePlatform(r.platform);
|
|
1022
|
+
if (!byPlat.has(key)) byPlat.set(key, { submitted: 0, callbacks: 0, scores: [] });
|
|
1023
|
+
const entry = byPlat.get(key);
|
|
1024
|
+
entry.submitted++;
|
|
1025
|
+
if (hasPositiveCallback(r)) entry.callbacks++;
|
|
1026
|
+
const rawSc = r.match_score !== null && r.match_score !== undefined ? r.match_score : r.score;
|
|
1027
|
+
const sc = (rawSc === null || rawSc === undefined || rawSc === "") ? Number.NaN : Number(rawSc);
|
|
1028
|
+
if (Number.isFinite(sc) && sc > 0 && sc <= 10) entry.scores.push(sc);
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
const tbody = document.getElementById("yield-tbody");
|
|
1032
|
+
if (!byPlat.size) {
|
|
1033
|
+
tbody.innerHTML = `<tr><td colspan="6" style="color:var(--muted);text-align:center;">No submitted applications yet in local logs. Click "Load Synthetic Sample" above to preview the layout, or load a JSON file.</td></tr>`;
|
|
1034
|
+
} else {
|
|
1035
|
+
tbody.innerHTML = [...byPlat.entries()]
|
|
1036
|
+
.sort((a, b) => b[1].submitted - a[1].submitted)
|
|
1037
|
+
.map(([plat, stat]) => {
|
|
1038
|
+
const rateObj = formatRateDisplay(stat.callbacks, stat.submitted);
|
|
1039
|
+
const avg = stat.scores.length ? (stat.scores.reduce((x, y) => x + y, 0) / stat.scores.length).toFixed(1) : "—";
|
|
1040
|
+
const barWidth = rateObj.sufficient ? Math.min(100, rateObj.pct) : 0;
|
|
1041
|
+
const barClass = rateObj.sufficient ? "bar-fill" : "bar-fill insufficient";
|
|
1042
|
+
return `<tr>
|
|
1043
|
+
<td><strong>${esc(plat)}</strong></td>
|
|
1044
|
+
<td>${stat.submitted}</td>
|
|
1045
|
+
<td>${stat.callbacks}</td>
|
|
1046
|
+
<td>${esc(rateObj.text)}</td>
|
|
1047
|
+
<td>${esc(avg)}</td>
|
|
1048
|
+
<td><div class="bar-wrap"><div class="${barClass}" style="width:${barWidth}%"></div></div></td>
|
|
1049
|
+
</tr>`;
|
|
1050
|
+
}).join("");
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
document.getElementById("dismiss-error-btn").addEventListener("click", clearError);
|
|
1055
|
+
|
|
1056
|
+
document.getElementById("search-input").addEventListener("input", e => {
|
|
1057
|
+
render(activeRecords, e.target.value);
|
|
1058
|
+
});
|
|
1059
|
+
|
|
1060
|
+
document.getElementById("demo-btn").addEventListener("click", () => {
|
|
1061
|
+
clearError();
|
|
1062
|
+
activeRecords = SYNTHETIC_DEMO_DATA;
|
|
1063
|
+
dataMode = "sample";
|
|
1064
|
+
isCustomLoadedFile = false;
|
|
1065
|
+
sourceLabel = `Synthetic Sample Data (${SYNTHETIC_DEMO_DATA.length} fictional records)`;
|
|
1066
|
+
render(activeRecords, document.getElementById("search-input").value);
|
|
1067
|
+
});
|
|
1068
|
+
|
|
1069
|
+
document.getElementById("reset-btn").addEventListener("click", () => {
|
|
1070
|
+
clearError();
|
|
1071
|
+
activeRecords = initialLocal;
|
|
1072
|
+
dataMode = "local";
|
|
1073
|
+
isCustomLoadedFile = false;
|
|
1074
|
+
sourceLabel = `logs/applications-log.json (${initialLocal.length} record(s))`;
|
|
1075
|
+
render(activeRecords, document.getElementById("search-input").value);
|
|
1076
|
+
});
|
|
1077
|
+
|
|
1078
|
+
document.getElementById("file-input").addEventListener("change", e => {
|
|
1079
|
+
const file = e.target.files && e.target.files[0];
|
|
1080
|
+
if (!file) return;
|
|
1081
|
+
const reader = new FileReader();
|
|
1082
|
+
reader.onload = () => {
|
|
1083
|
+
try {
|
|
1084
|
+
const parsed = JSON.parse(String(reader.result || ""));
|
|
1085
|
+
const records = Array.isArray(parsed) ? parsed : (Array.isArray(parsed?.applications) ? parsed.applications : null);
|
|
1086
|
+
if (!records) {
|
|
1087
|
+
throw new Error("Expected a JSON array or an object with an 'applications' array.");
|
|
1088
|
+
}
|
|
1089
|
+
clearError();
|
|
1090
|
+
activeRecords = records;
|
|
1091
|
+
dataMode = "local";
|
|
1092
|
+
isCustomLoadedFile = true;
|
|
1093
|
+
sourceLabel = `${file.name} (${records.length} local record(s))`;
|
|
1094
|
+
render(activeRecords, document.getElementById("search-input").value);
|
|
1095
|
+
} catch (err) {
|
|
1096
|
+
showError(`Could not parse "${file.name}": ${err.message}`);
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
reader.readAsText(file);
|
|
1100
|
+
e.target.value = "";
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
render(activeRecords);
|
|
1104
|
+
</script>
|
|
1105
|
+
</body>
|
|
1106
|
+
</html>
|