Skip to content

feat: support multiply publish versions and backends - #95

Draft
Yoorkin wants to merge 1 commit into
mainfrom
multi-version
Draft

feat: support multiply publish versions and backends#95
Yoorkin wants to merge 1 commit into
mainfrom
multi-version

Conversation

@Yoorkin

@Yoorkin Yoorkin commented Apr 9, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@Yoorkin
Yoorkin marked this pull request as draft April 9, 2025 09:12
@peter-jerry-ye-code-review

Copy link
Copy Markdown
Missing error handling in breadcrumbs implementation

Category
Correctness
Code Snippet
src/page/docs/docs.mbt:289-306
Recommendation
Add null checks and error handling for empty paths
Reasoning
The breadcrumbs function makes assumptions about path structures being well-formed. Should handle edge cases when paths are empty or malformed to prevent runtime errors.

Hard-coded backend preference in home view

Category
Maintainability
Code Snippet
src/page/home/view.mbt:102
if mod.backends.contains("wasm-gc") {
"wasm-gc"
} else {
backend
}
Recommendation
Move backend preference logic to a configuration or constants file
Reasoning
Hard-coding the preferred backend ('wasm-gc') makes the code less maintainable and harder to change if backend preferences change in the future. This should be configurable.

Multiple HTTP requests in load function could be combined

Category
Performance
Code Snippet
src/page/docs/docs.mbt:80-95
Recommendation
Consider combining the three resource.json requests into a single backend API call if possible
Reasoning
Making three separate HTTP requests for resource.json files increases load time and network overhead. A single API call returning all needed data would be more efficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant