Skip to content

Commit 5578fbe

Browse files
authored
Merge pull request #69 from devakone/develop
Release: develop → main
2 parents 5b0e0ea + 5402425 commit 5578fbe

9 files changed

Lines changed: 313 additions & 27 deletions

File tree

.github/workflows/release-pr.yml

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,31 @@ jobs:
101101
102102
if [ -n "$PR_NUMBER" ]; then
103103
echo "Updating existing PR #$PR_NUMBER"
104-
gh pr edit "$PR_NUMBER" \
105-
--title "$PR_TITLE" \
106-
--body-file "$BODY_FILE"
104+
set +e
105+
EDIT_OUTPUT="$(
106+
gh pr edit "$PR_NUMBER" \
107+
--title "$PR_TITLE" \
108+
--body-file "$BODY_FILE" 2>&1
109+
)"
110+
EDIT_EXIT=$?
111+
set -e
112+
113+
if [ "$EDIT_EXIT" -eq 0 ]; then
114+
echo "$EDIT_OUTPUT"
115+
exit 0
116+
fi
117+
118+
if echo "$EDIT_OUTPUT" | grep -q "Resource not accessible by personal access token"; then
119+
echo "::warning::RELEASE_PR_TOKEN could not edit PR. Falling back to GITHUB_TOKEN."
120+
export GH_TOKEN="$DEFAULT_GH_TOKEN"
121+
gh pr edit "$PR_NUMBER" \
122+
--title "$PR_TITLE" \
123+
--body-file "$BODY_FILE"
124+
exit 0
125+
fi
126+
127+
echo "$EDIT_OUTPUT"
128+
exit "$EDIT_EXIT"
107129
else
108130
echo "Creating new release PR"
109131
set +e
@@ -133,6 +155,35 @@ jobs:
133155
exit 0
134156
fi
135157
158+
if echo "$CREATE_OUTPUT" | grep -q "Resource not accessible by personal access token"; then
159+
echo "::warning::RELEASE_PR_TOKEN could not create PR. Falling back to GITHUB_TOKEN."
160+
export GH_TOKEN="$DEFAULT_GH_TOKEN"
161+
set +e
162+
CREATE_OUTPUT_FALLBACK="$(
163+
gh pr create \
164+
--base main \
165+
--head develop \
166+
--title "$PR_TITLE" \
167+
--body-file "$BODY_FILE" 2>&1
168+
)"
169+
CREATE_EXIT_FALLBACK=$?
170+
set -e
171+
172+
if [ "$CREATE_EXIT_FALLBACK" -eq 0 ]; then
173+
echo "$CREATE_OUTPUT_FALLBACK"
174+
exit 0
175+
fi
176+
177+
if echo "$CREATE_OUTPUT_FALLBACK" | grep -q "Resource not accessible by integration"; then
178+
echo "::warning::Unable to create release PR with fallback GITHUB_TOKEN."
179+
echo "$CREATE_OUTPUT_FALLBACK"
180+
exit 0
181+
fi
182+
183+
echo "$CREATE_OUTPUT_FALLBACK"
184+
exit "$CREATE_EXIT_FALLBACK"
185+
fi
186+
136187
echo "$CREATE_OUTPUT"
137188
exit "$CREATE_EXIT"
138189
fi
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
".": "0.1.0-alpha.23",
3-
"apps/web": "0.1.0-alpha.21",
2+
".": "0.1.0-alpha.24",
3+
"apps/web": "0.1.0-alpha.22",
44
"apps/worker": "0.1.0-alpha.3"
55
}

CHANGELOG-DEVELOP.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [0.1.0-alpha.24](https://github.com/devakone/vibe-coding-profiler/compare/vibe-coding-profiler-v0.1.0-alpha.23...vibe-coding-profiler-v0.1.0-alpha.24) (2026-02-15)
4+
5+
6+
### Bug Fixes
7+
8+
* **ci:** fallback to github token when PAT PR edit fails ([64a957f](https://github.com/devakone/vibe-coding-profiler/commit/64a957f5d3c9a2159150efcda769b514bdda1cd4))
9+
* use vibe_insights (v2) for repo VCP pages to match unified profile ([227044c](https://github.com/devakone/vibe-coding-profiler/commit/227044cc284f3ec3afdae66cd17de5108e688cc9))
10+
311
## [0.1.0-alpha.23](https://github.com/devakone/vibe-coding-profiler/compare/vibe-coding-profiler-v0.1.0-alpha.22...vibe-coding-profiler-v0.1.0-alpha.23) (2026-02-15)
412

513

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Thanks for helping improve Vibe Coding Profiler! We welcome new contributors—h
77
- **Bug/issue:** Open an issue describing the behaviour, steps to reproduce, and expected outcome.
88
- **New feature:** Link to the relevant PRD or tracker under `docs/prd/` and coordinate in `docs/implementation-trackers/`.
99
- **Docs or security improvements:** Target the `docs/` tree (architecture, security readiness, workflow notes).
10+
- **Need orientation first:** Read `docs/contributor-orientation.md` for a practical map of where to make changes.
1011

1112
Before working, confirm nobody else is already tackling it (add a comment or label the issue). If you’re unsure, open a discussion issue and tag `@devakone`.
1213

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Vibe Coding Profiler is an open-source “Vibe Coding Profile” experience that
2727

2828
## Documentation
2929

30+
- `docs/contributor-orientation.md`: onboarding map for new contributors (where to edit, how to validate, release flow)
3031
- `docs/security/open-source-preparedness.md`: release readiness + remaining hardening steps
3132
- `docs/PRD.md`: product requirements driving the interface
3233
- `docs/architecture/`: pipeline, LLM, share experiences

apps/web/CHANGELOG-DEVELOP.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [0.1.0-alpha.22](https://github.com/devakone/vibe-coding-profiler/compare/web-v0.1.0-alpha.21...web-v0.1.0-alpha.22) (2026-02-15)
4+
5+
6+
### Bug Fixes
7+
8+
* use vibe_insights (v2) for repo VCP pages to match unified profile ([227044c](https://github.com/devakone/vibe-coding-profiler/commit/227044cc284f3ec3afdae66cd17de5108e688cc9))
9+
310
## [0.1.0-alpha.21](https://github.com/devakone/vibe-coding-profiler/compare/web-v0.1.0-alpha.20...web-v0.1.0-alpha.21) (2026-02-12)
411

512

apps/web/src/app/analysis/page.tsx

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ type JobRow = {
1515
error_message: string | null;
1616
};
1717

18-
type InsightRow = {
18+
type VibeInsightRow = {
19+
job_id: string;
20+
persona_name: string | null;
21+
persona_confidence: string | null;
22+
generated_at: string | null;
23+
};
24+
25+
type LegacyInsightRow = {
1926
job_id: string;
2027
persona_label: string | null;
2128
persona_confidence: string | null;
@@ -54,33 +61,55 @@ export default async function AnalysisIndexPage() {
5461
repoNameById.set(row.id, row.full_name);
5562
}
5663

57-
// Get insights for completed jobs
64+
// Get vibe insights (v2) for completed jobs
5865
const jobIds = jobs.map((j) => j.id);
59-
const insightsResult =
66+
const vibeInsightsResult =
6067
jobIds.length > 0
68+
? await supabase
69+
.from("vibe_insights")
70+
.select("job_id, persona_name, persona_confidence, generated_at")
71+
.in("job_id", jobIds)
72+
: null;
73+
74+
const vibeInsightByJobId = new Map<string, VibeInsightRow>();
75+
for (const row of (vibeInsightsResult?.data ?? []) as VibeInsightRow[]) {
76+
vibeInsightByJobId.set(row.job_id, row);
77+
}
78+
79+
// Find jobs missing from vibe_insights and fetch from legacy analysis_insights
80+
const missingJobIds = jobIds.filter((id) => !vibeInsightByJobId.has(id));
81+
const legacyInsightsResult =
82+
missingJobIds.length > 0
6183
? await supabase
6284
.from("analysis_insights")
6385
.select("job_id, persona_label, persona_confidence, generated_at")
64-
.in("job_id", jobIds)
86+
.in("job_id", missingJobIds)
6587
: null;
6688

67-
const insightByJobId = new Map<string, InsightRow>();
68-
for (const row of (insightsResult?.data ?? []) as InsightRow[]) {
69-
insightByJobId.set(row.job_id, row);
89+
const legacyInsightByJobId = new Map<string, LegacyInsightRow>();
90+
for (const row of (legacyInsightsResult?.data ?? []) as LegacyInsightRow[]) {
91+
legacyInsightByJobId.set(row.job_id, row);
7092
}
7193

7294
// Build reports list (completed jobs, with insight data when available)
7395
const reports = jobs
7496
.filter((j) => j.status === "done")
7597
.map((j) => {
76-
const insight = insightByJobId.get(j.id);
98+
const vibeInsight = vibeInsightByJobId.get(j.id);
99+
const legacyInsight = legacyInsightByJobId.get(j.id);
100+
101+
// Use vibe_insights (v2) if available, fall back to analysis_insights (legacy)
102+
const personaLabel = vibeInsight?.persona_name ?? legacyInsight?.persona_label ?? null;
103+
const personaConfidence = vibeInsight?.persona_confidence ?? legacyInsight?.persona_confidence ?? null;
104+
const generatedAt = vibeInsight?.generated_at ?? legacyInsight?.generated_at ?? j.created_at;
105+
77106
return {
78107
jobId: j.id,
79108
repoId: j.repo_id,
80109
repoName: repoNameById.get(j.repo_id) ?? null,
81-
personaLabel: insight?.persona_label ?? null,
82-
personaConfidence: insight?.persona_confidence ?? null,
83-
generatedAt: insight?.generated_at ?? j.created_at,
110+
personaLabel,
111+
personaConfidence,
112+
generatedAt,
84113
status: j.status,
85114
};
86115
});

apps/web/src/app/vibes/page.tsx

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ type JobRow = {
1818
created_at: string;
1919
};
2020

21-
type InsightRow = {
21+
type VibeInsightRow = {
22+
job_id: string;
23+
persona_name: string | null;
24+
persona_confidence: string | null;
25+
generated_at: string | null;
26+
};
27+
28+
type LegacyInsightRow = {
2229
job_id: string;
2330
persona_label: string | null;
2431
persona_confidence: string | null;
@@ -74,18 +81,33 @@ export default async function VibesPage() {
7481
const jobs = (jobsData ?? []) as JobRow[];
7582
const jobIds = jobs.map((j) => j.id);
7683

77-
// Fetch insights for completed jobs
78-
const { data: insightsData } =
84+
// Fetch vibe insights (v2) for completed jobs
85+
const { data: vibeInsightsData } =
7986
jobIds.length > 0
87+
? await supabase
88+
.from("vibe_insights")
89+
.select("job_id, persona_name, persona_confidence, generated_at")
90+
.in("job_id", jobIds)
91+
: { data: [] };
92+
93+
const vibeInsightByJobId = new Map<string, VibeInsightRow>();
94+
for (const row of (vibeInsightsData ?? []) as VibeInsightRow[]) {
95+
vibeInsightByJobId.set(row.job_id, row);
96+
}
97+
98+
// Find jobs missing from vibe_insights and fetch from legacy analysis_insights
99+
const missingJobIds = jobIds.filter((id) => !vibeInsightByJobId.has(id));
100+
const { data: legacyInsightsData } =
101+
missingJobIds.length > 0
80102
? await supabase
81103
.from("analysis_insights")
82104
.select("job_id, persona_label, persona_confidence, generated_at")
83-
.in("job_id", jobIds)
105+
.in("job_id", missingJobIds)
84106
: { data: [] };
85107

86-
const insightByJobId = new Map<string, InsightRow>();
87-
for (const row of (insightsData ?? []) as InsightRow[]) {
88-
insightByJobId.set(row.job_id, row);
108+
const legacyInsightByJobId = new Map<string, LegacyInsightRow>();
109+
for (const row of (legacyInsightsData ?? []) as LegacyInsightRow[]) {
110+
legacyInsightByJobId.set(row.job_id, row);
89111
}
90112

91113
// Fetch metrics for commit counts
@@ -114,14 +136,21 @@ export default async function VibesPage() {
114136
const repos = connectedRepos.map((repo) => {
115137
const repoJobs = jobsByRepoId.get(repo.repoId) ?? [];
116138
const versions = repoJobs.map((job) => {
117-
const insight = insightByJobId.get(job.id);
139+
const vibeInsight = vibeInsightByJobId.get(job.id);
140+
const legacyInsight = legacyInsightByJobId.get(job.id);
118141
const metrics = metricsByJobId.get(job.id);
142+
143+
// Use vibe_insights (v2) if available, fall back to analysis_insights (legacy)
144+
const personaLabel = vibeInsight?.persona_name ?? legacyInsight?.persona_label ?? null;
145+
const personaConfidence = vibeInsight?.persona_confidence ?? legacyInsight?.persona_confidence ?? null;
146+
const generatedAt = vibeInsight?.generated_at ?? legacyInsight?.generated_at ?? job.created_at;
147+
119148
return {
120149
jobId: job.id,
121-
personaLabel: insight?.persona_label ?? null,
122-
personaConfidence: insight?.persona_confidence ?? null,
150+
personaLabel,
151+
personaConfidence,
123152
commitCount: metrics?.commit_count ?? null,
124-
generatedAt: insight?.generated_at ?? job.created_at,
153+
generatedAt,
125154
};
126155
});
127156

0 commit comments

Comments
 (0)