Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
"worktree:setup": "node scripts/worktree.mjs setup",
"cloudflare:token": "node scripts/refresh-cloudflare-tunnel-token.mjs",
"prepare": "simple-git-hooks",
"lint": "pnpm file-length:check && pnpm migration-metadata:check && pnpm test-architecture:check && pnpm dashboard-style:check && pnpm --filter @sentry/junior tool-annotations:check && pnpm --filter @sentry/junior tool-key-casing:check && pnpm --filter @sentry/junior tool-error-classification:check && pnpm --filter @sentry/junior lint && pnpm --filter @sentry/junior-memory lint && pnpm --filter @sentry/junior-github lint && pnpm --filter @sentry/junior-google lint && pnpm --filter @sentry/junior-linear lint && pnpm --filter @sentry/junior-sentry lint && pnpm --filter @sentry/junior-vercel lint && pnpm --filter @sentry/junior-dashboard lint && pnpm ast-grep:lint && pnpm package:lint",
"lint": "pnpm file-length:check && pnpm oxlint-rules:check && pnpm migration-metadata:check && pnpm test-architecture:check && pnpm dashboard-style:check && pnpm --filter @sentry/junior tool-annotations:check && pnpm --filter @sentry/junior tool-key-casing:check && pnpm --filter @sentry/junior tool-error-classification:check && pnpm --filter @sentry/junior lint && pnpm --filter @sentry/junior-memory lint && pnpm --filter @sentry/junior-github lint && pnpm --filter @sentry/junior-google lint && pnpm --filter @sentry/junior-linear lint && pnpm --filter @sentry/junior-sentry lint && pnpm --filter @sentry/junior-vercel lint && pnpm --filter @sentry/junior-dashboard lint && pnpm ast-grep:lint && pnpm package:lint",
"lint:fix": "pnpm --filter @sentry/junior lint:fix",
"file-length:check": "node --test scripts/check-file-length.test.mjs && node scripts/check-file-length.mjs",
"migration-metadata:check": "node --test scripts/check-drizzle-migrations.test.mjs && node scripts/check-drizzle-migrations.mjs",
"oxlint-rules:check": "node --test tools/oxlint/junior/rules/*.test.ts",
"test-architecture:check": "node --test scripts/check-test-architecture.test.mjs && node scripts/check-test-architecture.mjs",
"dashboard-style:check": "node --test scripts/check-dashboard-styles.test.mjs && node scripts/check-dashboard-styles.mjs",
"ast-grep:lint": "ast-grep test --test-dir ast-grep/tests --skip-snapshot-tests && ast-grep scan",
Expand Down
6 changes: 5 additions & 1 deletion packages/junior-dashboard/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,11 @@ export function createDashboardApp(
};

app.use("*", requireAuth);
app.use("/api/conversations/:conversationId", revalidateConversation);
// Core detail reads set a version ETag before they build the report. Mock
// reporting has no stored version, so it revalidates on content instead.
if (options.mockConversations) {
app.use("/api/conversations/:conversationId", revalidateConversation);
}

for (const route of authenticatedRoutes) {
const handler = (c: Context<{ Variables: Variables }>) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/junior-dashboard/src/conversation-cache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createHash } from "node:crypto";
import type { MiddlewareHandler } from "hono";

/** Revalidate dashboard detail reads only after the route checks viewer access. */
/** Revalidate mock detail reads on content, after the route checks viewer access. */
export const revalidateConversation: MiddlewareHandler = async (
context,
next,
Expand Down
13 changes: 12 additions & 1 deletion packages/junior/.oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
{
"name": "anti-slop",
"specifier": "../../tools/oxlint/anti-slop/index.ts"
},
{
"name": "junior",
"specifier": "../../tools/oxlint/junior/index.ts"
}
],
"ignorePatterns": [
Expand All @@ -28,7 +32,8 @@
".pi/**",
".roo/**",
".windsurf/**",
"tools/oxlint/anti-slop/**"
"tools/oxlint/anti-slop/**",
"tools/oxlint/junior/**"
],
"rules": {
"no-restricted-imports": [
Expand Down Expand Up @@ -73,6 +78,12 @@
"anti-slop/require-safety-comment-for-type-assertion": "off"
},
"overrides": [
{
"files": ["src/**/*.ts"],
"rules": {
"junior/touch-conversation-detail": "error"
}
},
{
"files": ["**/junior-github/src/**/*.ts"],
"rules": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "junior_conversations" ADD COLUMN "detail_version" integer DEFAULT 0 NOT NULL;
Loading
Loading