- collapse run log data blocks whose pretty-printed JSON exceeds a byte or line limit, with a per-block toggle and an expand/collapse-all button next to the Logs heading - align data blocks and toggles with the context/message column - add a "Copy logs" button that copies the filtered logs as plain text with every data block expanded - add GET /manifest.json with the app name, version and run log data limits (RUN_LOG_DATA_COLLAPSE_BYTES / RUN_LOG_DATA_COLLAPSE_LINES) - load the manifest in the client stale-while-revalidate: localStorage copy first, refetched per page load and on tab focus after a while - show the server version in the sidebar footer, with a reload hint when it differs from the client build Closes #3
11 lines
387 B
TypeScript
11 lines
387 B
TypeScript
import { useSyncExternalStore } from 'react';
|
|
import { getManifest, subscribeManifest, type Manifest } from '../lib/manifest';
|
|
|
|
/**
|
|
* Public client configuration from the server's /manifest.json: the cached
|
|
* copy (or defaults) at first, updated once the fresh one arrives.
|
|
*/
|
|
export function useManifest(): Manifest {
|
|
return useSyncExternalStore(subscribeManifest, getManifest);
|
|
}
|