Repository navigation
Replace the permissions stylesheet with shared native capabilities - #1415
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
debt-src at c162044 passes. |
trissim
force-pushed
the
fix/native-permissions-styles
branch
2 times, most recently
from
November 2, 2026 19:32
d111c51 to
eba5c73
Compare
trissim
force-pushed
the
fix/native-permissions-styles
branch
from
November 2, 2026 19:58
eba5c73 to
c162044
Compare
trissim
enabled auto-merge
November 2, 2026 20:07
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.
Summary
Five commits; 4 files; complete73-line permissions sheet removed. Initial affected controls4/4 in42.19s; corrected isolated resume control 1/1 in7.53s, rc0. Delete the complete 73-line permissions stylesheet and its load path. Existing permission controls compose shared partial fill, background and frame providers, preserving their Question/OptionList/Select/VerticalScroll implementations.
Native owners
Before: one screen selector reached through ids and descendants to supply geometry, paint and focus borders.
After:
Theme declarations extend
native_declarations()cooperatively. Textual's normal stylesheet application invokes the native-style hook with its existing resolver, so same-name variable refreshes and ordinary theme switches use the same value owner. Focus changes reapply that hook after the control's inherited focus lifecycle. The frontend control includes same-name register_theme + refresh_css, not only theme-name switching.The full WidgetView is deliberately not mixed into these controls: doing so would replace their inherited overflow, component paint, borders and other contracts. These partial capabilities apply their declared inputs through the existing Styles owners.
Preserved behavior
Question's answer, selection, blink, key and presentation lifetimes remain inherited. OptionList navigation, diff selection and VerticalScroll retain their implementation parents. The existing permission source-binding/cancellation check in PermissionReview remains unchanged.
The screen inherits ToadNode through PriorityActions → ActionPresentation → DeclaredWidgetActions and reads the configured diff preference through one method. The initial direct ToadNode base was placed before its descendant PriorityActions and made C3 inconsistent; that redundant base/import is removed. The removed two generic-App tests had no named generic-App constructor: the production factory is AgentSurface's PermissionReview; all found permission controls/tests use the Toad workspace.
Deleted selectors
Evidence and remaining work
Source parsing and diff checks pass. The trace covers the screen factory, composition, every selector target, inherited control lifetimes and current diff-view id producers.
Actual combined affected execution: 4 passed in42.19s, rc0; host TestLease released. Selection: new permission layout/focus/theme/answer control, existing permission-request controls, and the saved-session resume-modal control requested by the shared provider owner. The new control exercises ordinary theme switching and same-name register_theme + refresh_css, including background and focus-frame color changes.
Artifact:
/home/ts/.cache/agent-scratch/pi-ui-colleague/permissions-controls-01.log. Runtime Core04c174d6e/installed Textual06317bf19837; Toad candidate is the rebased #1415 source at c23ff70 plus the tested control repairs. The sender's unmerged Textual#228 source was not overlaid.Review caught my resume-control isolation error: removing the state-path patch without requesting Workspace left the test outside the collector's process wrapper. The prior4/4 is a real run, not an isolation certificate. A read-only immutable query found its synthetic saved-session row in /home/ts/.local/state/toad/toad.db; its metadata names the controls-01 test directory. That row is preserved and the diagnostic is permissions-prior-destination-01.json.
I also incorrectly called DB.create deleted. It is declared at db.py:144 and used by App.on_load; my first repair removed necessary schema initialization, which the existing ambient schema hid. Isolated controls02 then failed with no sessions table, rc1. The corrected control now consumes Workspace/project, checks that the DB path lies inside workspace.roots.attempt before any write, calls the existing DB.create schema owner, and retains the real session_new writer and typed Checkout comparison. No path patch or product compatibility method is introduced. The new permission fixture and answer list are typed. Corrected single-control execution: permissions-controls-03, 1 passed in7.53s, rc0; host lease released. It uses the actual process wrapper and fresh state, and its path guard executes before schema installation or session insertion. The prior isolation failure and controls02 schema failure remain retained; neither is reclassified as a pass.
#1414's provider, #226's native expression API and #227's Scalar/Expand annotations are merged and installed. Actual physical/configured-provider acceptance remains distinct from this successful frontend execution.
Assumed: the shared native property/theme refresh interface remains NativeLayout/NativeTheme plus native_theme, as confirmed by its owner; generic foreign-App construction is outside the traced permission-controller interface. Actual configured-provider and physical acceptance remain separate.