Add the debug packet recorder behind the developer-tools toggle.
Checks / checks (push) Successful in 2m14s
Trigger cinny-mobile / dispatch (push) Successful in 1s

This commit is contained in:
2026-11-01 09:01:38 +11:00
parent 9591d8d01b
commit 230ca4fcf0
6 changed files with 150 additions and 4 deletions
@@ -37,6 +37,7 @@ type DeveloperToolsProps = {
export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
const mx = useMatrixClient();
const [developerTools, setDeveloperTools] = useSetting(settingsAtom, 'developerTools');
const [debugPackets, setDebugPackets] = useSetting(settingsAtom, 'debugPackets');
const [expand, setExpend] = useState(false);
const [accountDataType, setAccountDataType] = useState<string | null>();
const [profileExpand, setProfileExpand] = useState(false);
@@ -162,6 +163,30 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
/>
}
/>
<SettingTile
title="Debug Packets"
description="Record every Matrix HTTP request and response."
after={
<Switch variant="Primary" value={debugPackets} onChange={setDebugPackets} />
}
/>
{window.electron?.debug && (
<SettingTile
title="Packet Window"
after={
<Button
onClick={() => window.electron?.debug?.openWindow()}
variant="Secondary"
fill="Soft"
size="300"
radii="300"
outlined
>
<Text size="B300">Open packet window</Text>
</Button>
}
/>
)}
</SequenceCard>
{developerTools && (
<SequenceCard
@@ -253,6 +253,11 @@ export const SETTINGS_SEARCH_CATALOG: SettingsSearchEntry[] = [
keywords: ['debug'],
},
{ page: SettingsPages.DeveloperToolsPage, title: 'Access Token', keywords: ['auth', 'secret'] },
{
page: SettingsPages.DeveloperToolsPage,
title: 'Debug Packets',
keywords: ['http', 'network', 'request', 'response'],
},
{ page: SettingsPages.DeveloperToolsPage, title: 'Account Data', keywords: ['global', 'events'] },
{
page: SettingsPages.DeveloperToolsPage,