Repository navigation
Replace the session resume stylesheet with native declarations - #1414
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.
trissim
force-pushed
the
fix/session-resume-native-styles
branch
from
November 2, 2026 15:42
51abd8e to
2e10058
Compare
|
debt-src at 3409546 passes. Warn-only, never blocks (2) |
trissim
force-pushed
the
fix/session-resume-native-styles
branch
from
November 2, 2026 16:30
2e10058 to
c89509b
Compare
trissim
force-pushed
the
fix/session-resume-native-styles
branch
from
November 2, 2026 18:47
c89509b to
3409546
Compare
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
3 files, +98/-45: session-resume stylesheet 35 -> 0 lines, including its CSS_PATH. Textual#226 is merged as da21bbd4784a59e2c6416077d90da30eee87db20; this consumer uses its native declaration API.
Before / After
Before: nested stylesheet selectors identify generic Markdown, Static, container, table and button roles and decide their geometry and colours.
After: NativeLayout supplies one cooperative registration hook. ResumeHeading retains MarkdownH1, ResumeHelp extends Markdown's decoder using the heading LEVEL, and ResumeWarning/ResumeFrame compose NativeTheme + NativeLayout + their original Static/VerticalGroup parents. Table/container/buttons retain DataTable, Center and HorizontalGroup. SessionResumeModal retains DismissibleScreen and its existing store/actions.
The caller remains screens/store.py. Session queries, row keys, actions, selection and dismissal are unchanged. WidgetView is not substituted wholesale: its complete defaults would overwrite inherited Markdown/DataTable overflow, borders and margins.
Deleted decisions and their owners
Deleted the entire 35-line session_resume_modal.tcss and CSS_PATH. Each role owns its irreducible geometry on its class. Warning border/text and frame-border alpha retain actual Styles property descriptors and nominal Variable/TextVariable/Keyword/Percent values.
NativeTheme.apply_native_styles participates in Textual's existing Stylesheet.apply publication, including cache hits and same-name palette refresh through App.refresh_css. Its native_declarations method supports cooperative provider composition. My earlier registration/Mount/theme-signal path was incomplete for KnownPalette.refresh_colours and is deleted, not retained as another invalidation path.
Textual#226 binds NativeDeclaration directly to its property implementation. CSS alone resolves external names. Both paths retain shared substitution, StylesBuilder and PaintState semantics, including automatic contrast and alpha; there is no copied Color.parse shortcut or ColorSystem derivation. A provisional WarningTextColour class was removed because text-warning is an expression rather than the RGB contract.
Evidence and limits
Assumed: these controls establish specified declaration/publication behavior, not painted geometry, focus, selection or real dialog acceptance. Those affected application cases remain open. P1088's merged spacing source and open physical acceptance are a separate order; its source delivery claim is now recorded at revision17.