Repository navigation
deck: the inspector's states, read from the model - #507
Merged
Merged
Conversation
Quick Deck v2's inspector shows these as off, or by name only, today. The
service now reads each from the open document's model (deckcraft-model),
read-only, with no new engine command:
- deck.themes: color_schemes as [{name, colors}], the engine's built-in
schemes (builtin_color_schemes, which design.themes names only) with
their twelve colours in the engine's order
- deck.open and deck.state: theme (state), color_scheme, font_scheme (the
first master's, as document.inspect reports the theme) and footer
{slide_numbers, footer, footer_text, date, hide_on_title}, the keys
deck.design {footer} takes; in deck.state too, so an undo shows
- deck.format_state: anchor and autofit as the box draws them
(resolve::body: its own, else its layout's and master's, else the
engine's defaults), in deck.format's words
- deck.slide: a chart's legend, data_labels, gridlines and palette, and a
table's options {header_row, total_row, banded_rows, first_column,
last_column, banded_columns}, as deck.chart and deck.table take them
Review nits on #503:
- the reader-parity test now includes a package that repair visibly
changes (a slide 5,000 points wide, which repair narrows to 4,000), so
dropping repair from engine_read fails it (tried, then restored)
- an Office package whose main part is a document or a workbook (.docx,
.xlsx, written by Office or laid out as LibreOffice writes one) is
unsupported:, not damaged:
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote
marked this pull request as ready for review
October 11, 2026 21:16
ymote
force-pushed
the
feat/deck-inspector-states
branch
from
October 11, 2026 21:16
0cefcaa to
171fefa
Compare
Contributor
Author
|
Local CI passed on 171fefa ( GitHub would run for this PR: desktop.yml, phone.yml, apps.yml. Merged on this local pass (macOS runner queue); GitHub CI runs on the merge commit on main.
Skipped (these did NOT pass; (!) marks a skip that blocks tools/ci-local-merge.sh):
Notes:
|
chrislearn
pushed a commit
to chrislearn/OctoSense
that referenced
this pull request
Oct 12, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrislearn
pushed a commit
to chrislearn/OctoSense
that referenced
this pull request
Oct 12, 2026
) The Theme tab marks the deck's colour set and font pair (deck.open and deck.state's color_scheme and font_scheme; a built-in theme's own pair by its families) and shows every colour set's colours and the deck's real footer; the Format tab's Box switches show the box's anchor and autofit (deck.format_state); a chart's elements and palette and a table's options (now all six) show deck.slide's values. A change shows at once and the service's next answer replaces it. After Undo or Redo, and after any design change, deck.state and deck.slide bring the deck's own values back without reopening, and the inspector keeps its scroll (refresh_view) so the control just used stays in view. The Fonts hint follows a theme change, a .docx or .xlsx refused as unsupported: is explained, and each segment, colour set, font pair and palette says whether it's chosen (View.selected) for tools. The pixel maps' notes follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrislearn
pushed a commit
to chrislearn/OctoSense
that referenced
this pull request
Oct 12, 2026
The dev fixture answers OctoSense-org#507's fields as the service does (colour sets with their colours, the deck's colour set, font pair and footer, a box's anchor and autofit, a chart's legend, data labels, gridlines and palette, a table's options) and keeps an undo history of the deck's data. ui.py's fixture journey checks the switches and marks against it, adds the table's and the footer's controls, and checks a change and its Undo; the shell journey's light pass changes a box's anchor and autofit, a chart's data labels, a table's total row, the colour set and the footer, reads each back from the engine and checks each Undo. --bundle and --grabs-only take another bundle's frames for a before and after. The model tests cover the new rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Quick Deck v2's inspector shows several states as off, or by name only, because the deck service doesn't report them yet: colour schemes come by name only, there's no current scheme or footer state, a box's anchor and autofit are missing, and so are a chart's and a table's options. This follows #503, as the maintainer saw on the approved sign-off page. It also picks up the reviewer's two nits on #503.
What
Every new value is read from the open document's model (
deckcraft-model), read-only, beside the engine commands each method already runs. There is no new engine command and nothing is written.deck.themes:color_schemesis now[{name, colors}], the engine's built-in colour schemes fromdeckcraft_model::theme::builtin_color_schemes, whichdesign.themesnames only.colorsholds twelve hex colours in the engine's order (dk1, lt1, dk2, lt2, accent1 to accent6, hlink, folHlink), as each theme'scolorsalready does.deck.openanddeck.state: these now reportcolor_schemeandfont_scheme, taken from the first master's theme (the masterdocument.inspectreportsthemefrom). They also reportfooterfrom the deck's header and footer settings, in the keysdeck.design {footer}takes.deck.statealso gainstheme. All four sit indeck.stateas well asdeck.open, so the inspector can follow an undo or a redo without reopening.deck.format_state: now reportsanchorandautofitas the box draws them, throughresolve::body: the box's own setting, else what its layout and master placeholders give, else the engine's defaults. Values are indeck.format's words.deck.slide: a chart's summary gainslegend,data_labels,gridlinesandpalette, and a table's gainsoptions, in the keysdeck.chartanddeck.table {op: "options"}take.slide.inspectleaves these out.the_guards_reader_reads_as_open_presentationnow includes a package thatrepairvisibly changes. Its slide is 5,000 points wide: the package reader keeps that (it takes up to 20,000), andrepairnarrows it to 4,000. Withrepairdropped fromengine_read, the test fails (tried on the build host, then restored)..docx,.xlsx) is nowunsupported:, notdamaged:. That covers files written by Office or laid out as LibreOffice writes them. The mapping sits inread_guarded's error mapping, beside "not a presentation DeckCraft can read".apps/AGENTS.md: one sentence on where the inspector's states come from.Contract additions for SERVICE.md
These are written here for the coordinator to carry into SERVICE.md after #506. This PR changes neither SERVICE.md nor
apps/quickdeck/.deck.themescolor_schemes(was[name])[{name: string, colors: [12 × "#RRGGBB"]}], colours in dk1, lt1, dk2, lt2, accent1–6, hlink, folHlink order{"name": "Ocean", "colors": ["#000000", "#FFFFFF", "#13293D", "#E8F1F2", "#006494", "#247BA0", "#1B98E0", "#6CC1E8", "#13293D", "#0B3954", "#1B98E0", "#6CC1E8"]}deck.open,deck.statecolor_scheme,font_schemestring(the first master's theme), ornullwith no master"color_scheme": "Ocean", "font_scheme": "Classic"deck.open,deck.statefooter{slide_numbers: bool, footer: bool, footer_text: string, date: bool, hide_on_title: bool}, the keysdeck.design {footer}takes{"slide_numbers": true, "footer": true, "footer_text": "Board", "date": true, "hide_on_title": true}deck.statethemestringornull(asdeck.open's)"theme": "DeckCraft"deck.format_stateanchor"top","middle","bottom"(deck.format's), or"justified","distributed"from an imported deck"anchor": "top"deck.format_stateautofit"none","shrink"or"resize"(deck.format's)"autofit": "shrink"(a body placeholder, from its master)deck.slide, a chart'schartlegend,data_labels,gridlines,palettelegend: a position code ("b","t","l","r", or another the deck holds, such as"tr") or"none"; two booleans; a palette name{"type": …, "title": …, "categories": […], "series": […], "legend": "b", "data_labels": false, "gridlines": true, "palette": "colorful1"}deck.slide, a table'stableoptions{header_row, total_row, banded_rows, first_column, last_column, banded_columns}, allbool"options": {"header_row": true, "total_row": false, "banded_rows": true, "first_column": false, "last_column": false, "banded_columns": false}deck.open,deck.cover.docxor.xlsxunsupported: this is an Office document but not a presentation, which the deck engine doesn't read (.pptx, .deckcraft, or outline .txt or .md)Review note per new read
deckcraft_model::theme::builtin_color_schemes()design.themesnames anddesign.colors {name}chooses from. Thirteen schemes of twelve colours each.deck.masters.first()→theme.colors.name,theme.fonts.namedocument.inspect'stheme.deck.header_footer(slide_number,footer,footer_text,date,hide_on_title)footer_textis the deck's own text: bounded by the session's character ceiling, and whatdeck.designset.deckcraft_model::resolve::body(ctx, shape), the function the renderer draws a box's body withformat_state's existing read, which puts its selection back.ShapeKind::Chart→legend,data_labels,gridlines,paletteslide.inspect's chart summaryShapeKind::Table→first_row,last_row,band_row,first_col,last_col,band_colslide.inspect's table summaryThe answers stay small: one 12-colour list per scheme in
deck.themes, five footer fields, and a few values per chart, table or box.Tests
On the Linux build host (x86_64), at head
0cefcaacon main202d7cc8:cargo test --locked -p octosense-deck-service -p octosense-engine-area: the deck service's lib tests, 86 passed and 1 ignored (the timing test);first_call1 andskill1 passed; engine-area 28 passed.cargo clippy --locked -p octosense-deck-service -p octosense-engine-area --all-targets --no-deps: no findings.the_inspector_reads_the_decks_design_and_its_objects:deck.design {colors, fonts, footer}, indeck.state, after a save and reopen indeck.open, and after an undo;topandshrink, a text boxresize, and both afterdeck.format;deck.chartanddeck.table {op: "options"}.an_office_document_that_is_not_a_presentation_is_unsupported. An Office-written.docxand.xlsx, and a.docxwith its content types last and past 4 KiB as LibreOffice writes one, are allunsupported:ondeck.openanddeck.cover.the_guards_reader_reads_as_open_presentationnow includes the wide package. It fails withoutrepairand passes with it.state_close_and_unsaved_changeschecksdeck.state's whole new answer, andlayouts_themes_fonts_and_shapescheckscolor_schemes' new shape.The shell's
host_toolsandsystem_chatweren't run: no shared crate changed (engine-area is untouched), and the agent's deck tools didn't change.Not run: the Quick Deck UI (its wiring follows once SERVICE.md has these), no shell or desktop run, no real LibreOffice or Office files (synthetic fixtures only).
🤖 Generated with Claude Code