Repository navigation
refactor: remove dead code, unused API, and stale docs - #123
Merged
Merged
Conversation
|
Visit the preview URL for this PR (updated for commit 56297b2): https://superdeck-dev--pr123-refactor-codebase-cl-55i0hmru.web.app (expires Fri, 23 Oct 2026 00:41:26 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: bd68fc230762285849207e7e120aaf87cd4ca2f9 |
The Wizard became the only authoring flow in #114, but code that only the file-backed editor used stayed behind: the Command pattern, a duplicate color utility, per-file bookmark access on both the Dart and Swift sides, unused store setters and revision tracking, DeckMarkdownCodec.encode, the deck-edit system prompt, and empty scaffold directories. Comments that still described editor sidebars and deck-edit tools now describe the current app.
Delete symbols, files, and fixtures that nothing references outside their own tests: MeasureSize, GoToSlideEvent, MarkdownRenderScope.of, unused Wizard UI components, generation helpers, test helpers, and config fixtures. None of them is exported. Correct comments that pointed at the wrong schema builder or narrated history.
Remove gpt_markdown, golden_toolkit, and integration_test from playground, meta from superdeck and builder, and mocktail from superdeck; move http to playground dev_dependencies. Stop bundling the unused iframe template.
DeckOptions has no const constructor, so the quick-start examples did not compile. The block-layout migration notes called 1.0 the next major and 0.x releases 1.x. The superdeck changelog named flutter_mermaid and a deprecation that became a removal. Copilot instructions listed a removed generator and a fixed frontmatter pitfall.
Drop the uninstalled custom_lint analyzer plugin, the lint_staged block with no runner, freezed and MeasureSize globs in the DCM scripts, and ignore entries for puppeteer and a removed env file.
Five packages loaded shared_analysis_options.yaml through an 'extends:' key that the analyzer does not recognize, so only cli applied it. Include it alongside the lint preset instead; no new issues surface.
…only state quick_agent is the Wizard's deck-generation engine, so name the folder for what it is. Remove validation codes nothing produces, the write-only open-deck field, and accessors and string wrappers only tests called; those tests now assert through what production exposes.
Remove aiSlideSchema, DeckWorkspace.projectDirectory, BlockInsets.authoringSchema, MarkdownAstConverter.toJson, SlideSerializer.serializeSlide, and superDeckAspectRatio. Nothing in production used them and each has a replacement noted in the changelog.
Drop usingTemplate, the duplicate ghost-suffix state in markdown helpers, CachedImage.targetSize, and PdfController.disposed. Rename savePdfWithFileSaverForTesting to savePdfWithFileSaver, since production uses it as the default saver.
Slides without a title showed 'Generative UI with Flutter'. Show only the slide number instead, and update the affected goldens.
Point package homepages and README links at conceptadev/superdeck, list the navigation reference in the docs sidebar, stop naming the deleted MeasureSize, and document vendor/ directories.
leoafarias
force-pushed
the
refactor/codebase-cleanup
branch
from
September 23, 2026 00:36
6a7c772 to
56297b2
Compare
leoafarias
added a commit
that referenced
this pull request
Sep 23, 2026
Resolve against #122 and #123 without restoring what they removed: - Keep DeckLibraryController.openDeck; the ownership fix now reads it in production. - Serialize retained generations with SlideSerializer instead of reviving DeckMarkdownCodec.encode. - Drop the PDF dialog's disposed check rather than restoring PdfController.disposed; the dialog disposes a controller only when it replaces it or unmounts. - Point imports and audit references at features/ai/generation, and state the renderer, assembly, and Mermaid decisions inline now that their notes are gone.
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.
Intent
Codebase-wide cleanup after the recent refactors. It removes code, API, dependencies, and files that nothing uses, and corrects docs and comments that are now false. There are two intentional exceptions:
Rebased on
mainafter #122.Commits
Command, a duplicate color util, per-file bookmark access (Dart and Swift), unused store APIs,DeckMarkdownCodec.encode, the unrendered deck-edit prompt, empty scaffolds, and editor-era comments._pollUntil.MeasureSize,GoToSlideEvent,MarkdownRenderScope.of, unused Wizard widgets, and generation helpersgpt_markdown,golden_toolkit, andintegration_testare removed;httpmoves to dev.metais removed.mocktailis removed, andiframe_template.htmlis no longer bundled.const SuperDeckApp(options: DeckOptions())examples did not compile.flutter_mermaid.custom_lintplugin, the unusedlint_stagedblock, freezed globs, and stale ignore entries.extends:key the analyzer ignores, so only cli applied the shared settings. Switching toinclude:surfaces no new issues.quick_agent/becomesgeneration/, since it is the Wizard's generation engine.refactor!— unused public API (with changelog entries):aiSlideSchema,DeckWorkspace.projectDirectory,BlockInsets.authoringSchema,MarkdownAstConverter.toJson,SlideSerializer.serializeSlide,superDeckAspectRatio.usingTemplate, the duplicate ghost-suffix state,CachedImage.targetSize, andPdfController.disposed.savePdfWithFileSaverForTestingbecomessavePdfWithFileSaver, since it is the production default.fix(superdeck): untitled slides no longer show "Generative UI with Flutter" in the default header. Fourci-excludedgoldens are updated.test(superdeck): fails when the vendored Mermaid parser's upstream version differs from the resolvedmermaid_core.demo/showcase.md.conceptadev/superdeck.navigation.mdxis added to the docs sidebar.MeasureSize.vendor/directories.melos-version), and.gitignoreexplicitly tracks the root lockfile.Impacted packages
core, builder, cli, superdeck, plugins/pdf, playground, and demo, plus root tooling config and docs.
Commands run (on the rebased branch)
fvm dart run melos bootstrapfvm dart run melos run build_runner:build --no-select: no generated-file driftfvm dart analyze --fatal-infosin all 7 packages, and on playgroundtest_live: no issuesfvm dart test(core, builder, cli) andfvm flutter test(superdeck, plugins/pdf, playground): all passingfvm dart run melos run contracts:check --no-select: schema up to datexcrun swiftc -parseon the changed Swift files: cleanNot run:
Kept on purpose
DeckPresentationState.isTransitioningand the convenience re-exports (DeckLoader,DeckPlugin,DeckWorkspace,DeckFormatException, and ack from core). These are API for consumers....ForTestingand@visibleForTestingseams, which are test seams rather than dead code.DeckCustomizationStore.level(). The tests have no other way to read resolved text styles without pumping widgets.generationBudget. It encodes the 30-second ceiling that the live smoke test asserts.#superdeck.Still open (needs a decision or tools we don't have here)
packages/playground/dcm_baseline.jsonstill suppresses about 468 findings. Clearing them needs a DCM license.documentation:URLs (docs.page/btwld),docs.jsonsocial links, image asset URLs, and the demo deck content still usebtwld. GitHub redirects them.DeckPresentationStateresetscurrentIndexto 0 even though the route keeps its slide.CommandXin cli has no direct tests. This predates this PR.