Skip to content

Commit 6f1988c

Browse files
committed
Custom views
1 parent 3caf5d2 commit 6f1988c

25 files changed

Lines changed: 867 additions & 1158 deletions

File tree

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
- Never deflect blame or make excuses like "this isn't related to my changes". Just focus on diagnosing and fixing the problem.
66

7+
## Code style
8+
9+
- Do not use fallbacks (e.g. `value || otherValue`). Use the correct field name directly. If the field name is wrong, fix it — don't paper over it.
10+
711
## UX tone
812

913
- Do not add patronising or condescending warnings, tooltips, or helper text (e.g. "Use with caution", "Are you sure?", "This action cannot be undone"). Trust that users understand what they are doing.

src/lib/components/OpeyInsightBar.svelte

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@
2222
loading = true;
2323
2424
try {
25-
// Build a rich notebook note from navigation + page data
26-
const dataPart = pageDataSummary.value
27-
? ` — ${pageDataSummary.value}`
28-
: "";
29-
await insightService.writeNote(`Navigated to ${pageContext}${dataPart}`);
25+
// Only write to notebook on detail pages (when pageDataSummary has content)
26+
if (pageDataSummary.value) {
27+
await insightService.writeNote(`${pageContext} — ${pageDataSummary.value}`);
28+
}
3029
3130
// Fetch last 10 notebook entries
3231
const recentNotes = await insightService.getRecentNotes(10);
3332
34-
// Ask Opey for a short insight
33+
// Ask Opey for a short insight based on notebook + current page
3534
const insight = await insightService.getInsight(pageContext, recentNotes);
3635
3736
insightText = insight || "";

0 commit comments

Comments
 (0)