Conversation
…gger Extract shared manifest resolution types (ContentRef, OutputManifest) and functions (isManifestHash, resolveContentRef, resolveDataBundle, resolveManifest) into lib/manifest-resolution.ts, eliminating ~150 LOC of duplication between materialize-cells.ts and useManifestResolver.ts. This also removes an unsafe `as Record<string, unknown>` type cast that was used to set display_id in useManifestResolver.ts — the shared resolveManifest now handles display_id directly via the JupyterOutput type which already supports the field. Migrate all raw console.* calls to the logger abstraction across 7 files: useCondaDependencies, useDependencies, useDenoDependencies, useGitInfo, useTrust, useUpdater, MarkdownCell. The logger gates debug output in production builds.
The @/ alias maps to desktop/src/, not apps/notebook/src/. The logger module lives in the notebook app, so it needs a relative import path.
3805a23 to
a2df0ac
Compare
11 tasks
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.
Two cleanup items from a codebase audit.
Manifest resolution deduplication —
materialize-cells.tsanduseManifestResolver.tshad ~150 LOC of duplicated types and blob resolution logic. Extracted into a sharedlib/manifest-resolution.tsmodule. This also removes an unsafeas Record<string, unknown>type cast fordisplay_id— the sharedresolveManifesthandles it directly via the existingJupyterOutputtype.Logger migration — 7 files were using raw
console.*calls, bypassing theloggerabstraction that gates debug output in production. Migrated all of them:useCondaDependencies,useDependencies,useDenoDependencies,useGitInfo,useTrust,useUpdater,MarkdownCell.Net: -135 lines, one fewer copy-paste surface, consistent logging.