Add configurable IPC input caps in Settings and wire them into main-process validation#31
Draft
Copilot wants to merge 2 commits into
Draft
Add configurable IPC input caps in Settings and wire them into main-process validation#31Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
5 tasks
Copilot
AI
changed the title
[WIP] Add user-configurable IPC input caps in Settings
Add configurable IPC input caps in Settings and wire them into main-process validation
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change moves user-facing IPC payload limits (session summary, session notes, skill file content) out of hardcoded values and into Settings, while preserving previous defaults on upgrade. The fixed 1MB HTTP response cap remains unchanged as a hard security boundary.
Settings model + persistence
AppSettingswith:summaryMaxLength(100–5,000; default 1,000)notesMaxLength(10,000–500,000; default 100,000)skillFileMaxBytes(64KB–2MB; default 512KB)localStoragevalues are normalized safely.Settings UI: new Limits section (under Trusted Directories)
Renderer → main cap propagation
app:set-input-caps.setInputCaps(...).Main-process enforcement updates
sessions:rename→inputCaps.summaryMaxLengthsessions:set-notes→inputCaps.notesMaxLengthskills:save-file→inputCaps.skillFileMaxByteselectron/main.tsto enforce safe server-side ranges regardless of renderer input.Additional sweep hardening
skills:createdescription content (MAX_SKILL_DESCRIPTION_LENGTH) to prevent unbounded writes on that freeform path as well.