mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-12-03 03:29:51 +00:00
P0: an interrupted cold hydration left partial caches that the emptiness check read as warm — the daily backfill froze (missing older days) while session parsing healed gradually (drifting totals), poisoning every surface sharing the cache. Both caches now carry an explicit complete marker: partial resumes cold under the hydration lock; unmarked caches self-heal with one re-hydration. Regression test seeds the exact frozen artifact and asserts bit-for-bit convergence with a never-interrupted run. - splash indexing reveals only on genuinely cold scans (explicit cold flag in the progress protocol), never on warm incremental re-parses - uncached filter switches clear to skeleton instead of showing the previous filter's numbers; cached switches paint same-commit; background prefetch warms every detected provider after idle - build stamp (git sha + date) in splash and About ends build ambiguity - payload parity test: identical payloads on identical cache, and payload totals equal the CLI report path - Sessions empty state keeps the provider filter row; zero savings line hidden; TCC usage-description strings + Full Disk Access docs - warm profile documented: optimize scan ~1.47s dominant (safe refactor deferred), parse ~1s, aggregation ~30ms Root 1848, app 320, typechecks clean.
81 lines
3 KiB
TypeScript
81 lines
3 KiB
TypeScript
import { useEffect, type MouseEvent, type ReactNode } from 'react'
|
||
|
||
import { version } from '../../package.json'
|
||
import { FlameMark } from './FlameMark'
|
||
import { BUILD_STAMP } from '../lib/build'
|
||
import { codeburn } from '../lib/ipc'
|
||
|
||
export type SocialLink = {
|
||
label: string
|
||
url: string
|
||
icon: ReactNode
|
||
}
|
||
|
||
const RELEASES_URL = 'https://github.com/getagentseal/codeburn/releases'
|
||
|
||
function openExternal(event: MouseEvent<HTMLAnchorElement>, url: string): void {
|
||
event.preventDefault()
|
||
void codeburn.openExternal(url)
|
||
}
|
||
|
||
export function AboutModal({ socials, onClose }: { socials: SocialLink[]; onClose: () => void }) {
|
||
useEffect(() => {
|
||
const onKeyDown = (event: KeyboardEvent) => {
|
||
if (event.key === 'Escape') onClose()
|
||
}
|
||
|
||
document.addEventListener('keydown', onKeyDown)
|
||
return () => document.removeEventListener('keydown', onKeyDown)
|
||
}, [onClose])
|
||
|
||
return (
|
||
<div className="about-modal-backdrop" onClick={onClose}>
|
||
<div
|
||
className="about-modal"
|
||
role="dialog"
|
||
aria-modal="true"
|
||
aria-labelledby="about-modal-title"
|
||
onClick={event => event.stopPropagation()}
|
||
>
|
||
<button className="about-modal-close" type="button" aria-label="Close About" onClick={onClose}>×</button>
|
||
<div className="about-modal-grid">
|
||
<div className="about-modal-hero">
|
||
<span className="about-modal-logo" aria-hidden="true"><FlameMark size={52} /></span>
|
||
<div className="about-modal-name" id="about-modal-title">CodeBurn</div>
|
||
<div className="about-modal-version">v{version}</div>
|
||
<div className="about-modal-build">{BUILD_STAMP}</div>
|
||
<div className="about-modal-tagline">Know where every token goes, across every AI coding tool.</div>
|
||
</div>
|
||
<div className="about-modal-side">
|
||
<div className="about-modal-section">
|
||
<div className="about-modal-section-title">Links</div>
|
||
{socials.map(social => (
|
||
<a
|
||
className="about-modal-link"
|
||
href={social.url}
|
||
key={social.label}
|
||
onClick={event => openExternal(event, social.url)}
|
||
>
|
||
{social.icon}
|
||
<span>{social.label}</span>
|
||
<span className="about-modal-external" aria-hidden="true">↗</span>
|
||
</a>
|
||
))}
|
||
</div>
|
||
<div className="about-modal-section about-modal-updates">
|
||
<div className="about-modal-section-title">Updates</div>
|
||
<button
|
||
className="about-modal-update-button"
|
||
type="button"
|
||
onClick={() => { void codeburn.openExternal(RELEASES_URL) }}
|
||
>
|
||
Check for updates
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div className="about-modal-credit">Developed by Resham Joshi · github.com/iamtoruk</div>
|
||
</div>
|
||
</div>
|
||
)
|
||
}
|