chore(boltbot): remove AI-generated comment slop, gitignore specs
This commit is contained in:
parent
5657dad29d
commit
1382694aaa
3
.gitignore
vendored
3
.gitignore
vendored
@ -69,5 +69,8 @@ IDENTITY.md
|
|||||||
USER.md
|
USER.md
|
||||||
.tgz
|
.tgz
|
||||||
|
|
||||||
|
# specs (generated, not shipped)
|
||||||
|
docs/specs/
|
||||||
|
|
||||||
# local tooling
|
# local tooling
|
||||||
.serena/
|
.serena/
|
||||||
|
|||||||
@ -56,7 +56,6 @@ export default function App() {
|
|||||||
setSearchParams({ anomalies: v ? "1" : "" });
|
setSearchParams({ anomalies: v ? "1" : "" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Polling: merge new receipts at the top, do NOT touch loadedCount or hasMore
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (receipts) {
|
if (receipts) {
|
||||||
setAllReceipts((prev) => {
|
setAllReceipts((prev) => {
|
||||||
@ -68,7 +67,6 @@ export default function App() {
|
|||||||
}
|
}
|
||||||
}, [receipts]);
|
}, [receipts]);
|
||||||
|
|
||||||
// Initial load: set hasMore and loadedCount once
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (receipts && !initialLoadDone.current) {
|
if (receipts && !initialLoadDone.current) {
|
||||||
initialLoadDone.current = true;
|
initialLoadDone.current = true;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #0a0a0a; /* neutral-950 */
|
background-color: #0a0a0a;
|
||||||
color: #f5f5f5; /* neutral-100 */
|
color: #f5f5f5;
|
||||||
font-family: "Space Grotesk", sans-serif;
|
font-family: "Space Grotesk", sans-serif;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
|
|||||||
@ -33,14 +33,11 @@ export function registerDashboardRoutes(api: PluginApi) {
|
|||||||
const idx = url.indexOf(basePath);
|
const idx = url.indexOf(basePath);
|
||||||
let filePath = idx !== -1 ? url.slice(idx + basePath.length) : "/";
|
let filePath = idx !== -1 ? url.slice(idx + basePath.length) : "/";
|
||||||
|
|
||||||
// Strip query string
|
|
||||||
const qIdx = filePath.indexOf("?");
|
const qIdx = filePath.indexOf("?");
|
||||||
if (qIdx !== -1) filePath = filePath.slice(0, qIdx);
|
if (qIdx !== -1) filePath = filePath.slice(0, qIdx);
|
||||||
|
|
||||||
// Default to index.html
|
|
||||||
if (!filePath || filePath === "/") filePath = "/index.html";
|
if (!filePath || filePath === "/") filePath = "/index.html";
|
||||||
|
|
||||||
// Sanitize: prevent directory traversal
|
|
||||||
const decoded = decodeURIComponent(filePath);
|
const decoded = decodeURIComponent(filePath);
|
||||||
const absolutePath = join(DIST_DIR, normalize(decoded));
|
const absolutePath = join(DIST_DIR, normalize(decoded));
|
||||||
const resolvedDist = resolve(DIST_DIR);
|
const resolvedDist = resolve(DIST_DIR);
|
||||||
@ -55,7 +52,6 @@ export function registerDashboardRoutes(api: PluginApi) {
|
|||||||
try {
|
try {
|
||||||
content = readFileSync(absolutePath);
|
content = readFileSync(absolutePath);
|
||||||
} catch {
|
} catch {
|
||||||
// SPA catch-all: serve index.html for unknown paths
|
|
||||||
try {
|
try {
|
||||||
content = readFileSync(join(DIST_DIR, "index.html"));
|
content = readFileSync(join(DIST_DIR, "index.html"));
|
||||||
servingIndex = true;
|
servingIndex = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user