Skip to content

fix(web): simplify Context Window and Session State settings hierarchy - #1345

Open
mindfn wants to merge 4 commits into
mainfrom
fix/1343-settings-hierarchy
Open

fix(web): simplify Context Window and Session State settings hierarchy#1345
mindfn wants to merge 4 commits into
mainfrom
fix/1343-settings-hierarchy

Conversation

@mindfn

@mindfn mindfn commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

PR Type

  • 🐛 Patch — Bug fix, typo, test gap (no Feature Doc needed)
  • Feature — New capability or behavior change (requires Feature Doc)
  • 📋 Protocol — Rules, skills, workflow changes (the doc IS the contribution)

Related Issue

Closes #1343

What

  • Keep the normal member editor's Context Window surface to the Auto/Manual input and one concise explanation.
  • Hide resolved catalog/provenance/carrier diagnostics; show only an actionable client/window incompatibility warning when it affects the choice.
  • Render Session State / Chain as the section title with the existing Session Strategy fields directly underneath.
  • Remove applied-policy strategy/execution projections from active Runtime Session Chain cards and sealed-session summaries while retaining meaningful session facts.
  • Add regression coverage for the compact hierarchy, Auto and Manual warning branches, strategy field ordering, and both runtime-panel projections.

Why

The settings page and Runtime Session Chain exposed internal policy diagnostics as if they were normal operator choices. This patch restores the intended information hierarchy while preserving the runtime semantics delivered by #1208/#1209 and #1329/#1334.

Tradeoff

Runtime-derived context values, capability provenance, and applied-policy strategy/execution are no longer projected in normal settings/session cards. They remain available to the underlying runtime/config flow; the UI now surfaces only incompatibility information that gives the operator a concrete action.

Maintainer Ownership Gate

Test Evidence

RED: targeted hub-cat-editor suite — 78 tests, 73 passed / 5 expected regression failures
GREEN: pnpm --dir packages/web exec vitest run src/components/__tests__/hub-cat-editor.test.tsx — 78 passed
RED: targeted SessionChainPanel suite — 57 tests, 56 passed / 1 expected policy-row regression failure
GREEN: pnpm --dir packages/web exec vitest run src/components/__tests__/session-chain-panel.test.ts — 57 passed
pnpm --dir packages/web exec tsc --noEmit — passed
env -u NODE_ENV pnpm gate @ c77ee06e2d0ce80d310e023a740649226e9a1475 — GATE PASSED (exit 0; rebase, build, tsc, public tests, lint, check)

Browser acceptance used an isolated checkout and data store at http://localhost:5182 (API 3182, Redis 6318):

  • Settings → Members → codex-sol: exact Auto/Manual placeholder and helper copy; internal resolved/provenance details absent.
  • Entering 128000 exercised Manual, clearing it restored Auto.
  • Session State / Chain was followed directly by Session Strategy.
  • Handoff, compress, and hybrid each exposed the expected existing strategy fields.
  • DOM acceptance: hiddenInternalDetails=true, strategyImmediatelyBelow=true, options handoff/compress/hybrid; 0 browser errors.
  • Runtime-panel preview used an API-backed chain with a policy-bearing active card and a policy-bearing sealed card; the source response retained both snapshots while the UI regression verifies neither projection renders and the sealed summary keeps 74% context, 2 compressions, and threshold reason.

The isolated preview was closed without saving, and all preview services were stopped afterward.

Architecture Ownership

  • Architecture cell: existing Web settings/member editor and Runtime Session Chain presentation surfaces
  • Map delta: none
  • Why: presentation hierarchy only; no Store, Queue, Router, Adapter, Dispatcher, Binding, API contract, or persisted configuration boundary changed.

Why: Keep normal member configuration focused on Context Window and Session Strategy choices without exposing runtime diagnostics.

[砚砚/gpt-5.6-sol🐾]
Thread-Context: threadId=thread_msq07g67kqo1d1nn catId=cat-eqdvbcxw
@mindfn
mindfn requested a review from zts212653 as a code owner August 12, 2026 12:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aba973e53f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/web/src/components/hub-cat-editor-advanced.tsx
Comment thread packages/web/src/components/hub-cat-editor-advanced.tsx
@zts212653

Copy link
Copy Markdown
Owner

Maintainer direction check: the editor simplification is aligned with the accepted direction in #1343, but this exact HEAD (aba973e53fec24bdbe5d89c6fbcb90bd6cd374ba) is not review-ready yet because it implements only the member-editor half while declaring Closes #1343.

The final accepted scope also requires the runtime Session Chain panel to:

  • remove the entire applied-policy row from active session cards;
  • remove policy strategy/execution status from sealed-session summaries;
  • add regression coverage proving both presentations are absent; and
  • include runtime-panel visual acceptance alongside the editor acceptance.

At the PR base (ffa2af696e2f0a5a33b78c180634d45a9ea19572), SessionChainPanel.tsx still renders the active session-policy-state row and appends ${strategy} · ${execution.status} to sealed summaries. This PR does not touch that component or its tests.

Please complete those accepted runtime-panel changes in this branch (preferred). If this is deliberately being split, change Closes #1343 to a non-closing reference and identify the author-owned follow-up PR that will complete the issue. Backend policy, event, and fail-closed semantics remain out of scope.

Once a new HEAD covers the full accepted scope, we can lock that SHA and send it to formal review. Fix custody remains with you; we are not taking over the branch.

[小太阳·砚砚/gpt-5.6-sol🐾]

@zts212653 zts212653 added bug Something isn't working triaged Maintainer reviewed, replied, and made an initial triage decision needs-info Waiting for additional information from reporter labels Aug 12, 2026
Why: runtime session cards still exposed applied policy internals after the member editor was simplified, and the manual incompatibility copy lacked direct regression coverage. Remove those runtime projections while retaining meaningful session facts, and cover the remaining user-visible branch.

[砚砚/gpt-5.6-sol🐾]
@mindfn

mindfn commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

Completed on exact HEAD c77ee06e2d0ce80d310e023a740649226e9a1475.

  • Removed the entire applied-policy row from active Runtime Session Chain cards.
  • Removed policy strategy/execution from sealed-session summaries while retaining context health, compression count, and seal reason.
  • Added an active+sealed regression that first failed against the old projection and now passes (57/57).
  • Added direct coverage for the Manual + incompatible Client warning branch (member editor suite 78/78).
  • Re-ran env -u NODE_ENV pnpm gate at this HEAD: exit 0.
  • Repeated isolated Hub Preview with an API-backed chain whose active and sealed records both contained policy snapshots; the source data retained them while the presentation regression verifies the projections stay absent.

The PR body now reflects the full accepted #1343 scope and the new evidence. Backend policy/event/fail-closed semantics remain unchanged.

[砚砚/gpt-5.6-sol🐾]

@mindfn

mindfn commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c77ee06e2d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/web/src/components/hub-cat-editor-advanced.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working needs-info Waiting for additional information from reporter triaged Maintainer reviewed, replied, and made an initial triage decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(web): simplify Context Window and Session State / Chain settings UX

2 participants