fix: resolve all lint/build errors and protected-paths.ps1 syntax for green CI #4689
11 changed files+44−16
Added.github/ALLOW_PROTECTED_PATHS+1−0View fileUnifiedSplit
@@ -0,0 +1 @@
1Reason: Fixing ESLint parsing errors in protected paths (D8TV.tsx) to make quality gates green.
Modified.github/scripts/protected-paths.ps1+3−3View fileUnifiedSplit
@@ -1,6 +1,3 @@
1Set-StrictMode -Version Latest
2$ErrorActionPreference="Stop"
3
41param(
52 [string]$BaseRef = "origin/main",
63 [string]$HeadRef = "HEAD",
@@ -9,6 +6,9 @@ param(
96 [string]$PrLabels = ""
107)
118
9Set-StrictMode -Version Latest
10$ErrorActionPreference="Stop"
11
1212function Fail([string]$m){ Write-Host $m -ForegroundColor Red; exit 1 }
1313function Info([string]$m){ Write-Host $m -ForegroundColor Cyan }
1414
Modifiedsrc/app/(marketing)/_d8/D8Bits.tsx+29−1View fileUnifiedSplit
@@ -1,6 +1,11 @@
11import React from "react";
22
3export function D8Card(props: { children?: React.ReactNode }) {
3export function D8Card(props: {
4 title?: string;
5 body?: string;
6 kicker?: string;
7 children?: React.ReactNode;
8}) {
49 return (
510 <div
611 style={{
@@ -11,6 +16,29 @@ export function D8Card(props: { children?: React.ReactNode }) {
1116 boxShadow: "0 18px 55px rgba(0,0,0,0.35)",
1217 }}
1318 >
19 {props.kicker ? (
20 <div
21 style={{
22 fontSize: 11,
23 fontWeight: 900,
24 letterSpacing: "0.18em",
25 textTransform: "uppercase",
26 color: "rgba(237,234,247,0.75)",
27 }}
28 >
29 {props.kicker}
30 </div>
31 ) : null}
32 {props.title ? (
33 <div style={{ marginTop: props.kicker ? 8 : 0, fontSize: 15, fontWeight: 900, color: "rgba(246,242,255,0.95)" }}>
34 {props.title}
35 </div>
36 ) : null}
37 {props.body ? (
38 <div style={{ marginTop: 8, fontSize: 13, lineHeight: 1.55, color: "rgba(237,234,247,0.72)" }}>
39 {props.body}
40 </div>
41 ) : null}
1442 {props.children}
1543 </div>
1644 );
Modifiedsrc/app/_client/D8TV.tsx+0−3View fileUnifiedSplit
@@ -12,9 +12,6 @@ export type D8SectionProps = {
1212};
1313
1414export function D8Section(props: D8SectionProps) {
15 tone?: string;
16 lead?: string;
17 eyebrow?: string;
1815 const { title, subtitle, children, id } = props;
1916
2017 // Keep server-safe: no "use client", no browser-only APIs.
Modifiedsrc/app/admin/marketing-queue/page.tsx+5−1View fileUnifiedSplit
@@ -128,7 +128,11 @@ export default function Page() {
128128
129129 const [scheduleLocal, setScheduleLocal] = useState(""); // datetime-local
130130
131 const headers = useMemo(() => (token ? { "x-admin-token": token } : {}), [token]);
131 const headers = useMemo(() => {
132 const h: Record<string, string> = {};
133 if (token) h["x-admin-token"] = token;
134 return h;
135 }, [token]);
132136
133137 async function refresh() {
134138 setErr(null);
Modifiedsrc/app/api/__probe__/route.ts+1−1View fileUnifiedSplit
@@ -4,7 +4,7 @@ export const runtime = "nodejs";
44export const dynamic = "force-dynamic";
55
66function safeEnv(name: string): string | null {
7 try: any {
7 try {
88 // @ts-ignore
99 const v = process?.env?.[name];
1010 return typeof v === "string" && v.length ? v : null;
Modifiedsrc/app/page.tsx+0−5View fileUnifiedSplit
@@ -1,8 +1,3 @@
1// === D8_AUTOREPAIR_DEMO_START ===
2// Intentionally missing import to demonstrate Auto Repair fixing a build.
3// This produces a deterministic "Module not found" error with zero UI impact.
4import AutoRepairDemoWidget from "./_client/AutoRepairDemoWidget";
5// === D8_AUTOREPAIR_DEMO_END ===
61export const dynamic = "force-dynamic";
72export const revalidate = 0;
83
Modifiedsrc/app/video/_client/VideoStudioClient.tsx+1−0View fileUnifiedSplit
@@ -169,6 +169,7 @@ export default function VideoStudioClient() {
169169 let t0 = performance.now();
170170
171171 function tick() {
172 if (!ctx) return;
172173 const elapsed = (performance.now() - t0) / 1000;
173174 let acc = 0;
174175 let idx = 0;
Modifiedsrc/lib/d8kv.ts+3−0View fileUnifiedSplit
@@ -50,4 +50,7 @@ export function d8Key_bundleRun(projectId: string, runId: string) {
5050}
5151export function d8Key_patchLatest(projectId: string) {
5252 return `agentPatch:project:${projectId}:latest`;
53}
54export function projectVideoKey(projectId: string) {
55 return `projectVideo:${projectId}`;
5356}
\ No newline at end of file
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts