Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TODO Comments to discuss #314

Open
Open
Assignees
davesnxpedrobslisboa
@pedrobslisboa

Description

@pedrobslisboa

I used AI to group our TODOs, my idea is to review them here and, if necessary, create a specific issue to solve it. Let's use this space to discuss them. CC:@davesnx

TODO Issues - server-reason-react

This document contains all TODO comments found in the codebase, formatted as GitHub issues for better tracking and prioritization.

Issue#1: Promise Caching and Error Handling

Files:

Description:
Implement promise caching functionality and improve promise error handling. There's a specific issue with promise failure handling that needs to be addressed.

Context:
There's commented-out code showing promise caching implementation forJs.Promise.t types. The implementation would cache promises to avoid re-executing them. Additionally, there are references to issue#251 regarding promise failure handling.

Acceptance Criteria:

  • Determine when promise caching is needed
  • Implement promise caching mechanism
  • Review and fix issueClient value as props can fail and will reach the toplevel handler #251 (promise failure handling)
  • Add configuration options for caching behavior
  • Add tests for promise caching and error scenarios
  • Implement the missing test for client components with promise failed props

🔧 React Server DOM Issues

Issue#3: Debug Information Improvements

Files:

Description:
Comprehensive improvements to debug information system including component info, stack traces, and error handling.

Context:
Multiple debug-related TODOs covering:

  • debugOwner should be aReactComponentInfo instead of string
  • OnlyReactComponentInfo is implemented, missing other types from React Flight Server
  • Need to add props and stack information to debug info
  • Stack info should be captured from both regular and async components
  • Error digest should use UUID instead of hash
  • Debug chunks might need specific ordering

Acceptance Criteria:

  • Change debug owner from string toReactComponentInfo
  • Implement missing React Flight Server component info types
  • Capture component props and stack traces in debug info
  • Implement stack capture for regular and async components
  • Replace hash-based digest with UUID
  • Implement proper debug chunk ordering
  • Update debug info serialization and tests
  • Update documentation with debug capabilities

Issue#4: HTML Encoding and Security

Files:

Description:
Determine if we need to HTML encode the model or only the HTML content for security.

Context:
This is a security consideration for preventing XSS attacks. The question is whether the model data needs HTML encoding or if only the final HTML output needs encoding.

Acceptance Criteria:

  • Research React's approach to HTML encoding
  • Implement appropriate encoding strategy
  • Add security tests
  • Update documentation with security considerations

Issue#5: Root Element and Suspense Handling

Files:

Description:
Clarify and improve root element handling and Suspense component behavior.

Context:
Multiple TODOs about root element handling:

  • Can we remove theis_root difference? Purpose is unclear
  • Need to check ifis_root logic applies to Suspense components
  • Maybe need to push suspense index and suspense node separately
  • Do we need to care if there'sAny_promise raising in Suspense?

Acceptance Criteria:

  • Research React's root element handling
  • Determine ifis_root logic is necessary
  • Implement appropriate root handling for Suspense components
  • Research React's Suspense implementation for index/node handling
  • Implement proper Suspense error handling forAny_promise
  • Add tests for root element and Suspense behavior
  • Update documentation

Issue#6: Context Provider and Consumer Handling

Files:

Description:
Determine if Provider and Consumer components need special handling.

Context:
React Context Provider and Consumer components may need special handling in the server-side rendering pipeline.

Acceptance Criteria:

  • Research React Context handling in SSR
  • Determine if special Provider/Consumer handling is needed
  • Implement appropriate Context handling
  • Add tests for Context components

Issue#7: Performance Optimizations

Files:

Description:
Various performance improvements including tail recursion, HTML processing, and render optimization.

Context:
Multiple performance-related TODOs:

  • List.split is not tail recursive and could cause stack overflow
  • Html.List being set for single elements may be unnecessary
  • Implement abortion mechanism based on timeout
  • Ensure chunks are of appropriate minimum/maximum size

Acceptance Criteria:

  • ReplaceList.split with tail recursive implementation
  • Find and optimizeHtml.List usage for single elements
  • Implement timeout-based render abortion
  • Implement minimum and maximum chunk size constraints
  • Add tests for large element lists and performance scenarios
  • Benchmark performance improvements
  • Update documentation with performance considerations

🧪 Test and Deduplication Issues

Issue#8: Client Component Script Deduplication

Files:

Description:
Implement deduplication for client component scripts and determine if model deduplication is needed.

Context:
Multiple TODOs about deduplication:

  • Don't push multiple scripts for the same client component
  • Deduplication only works on HTML currently, unclear if model needs same logic
  • Links that aren't hoisted to the head are not deduplicated

Acceptance Criteria:

  • Implement client component script deduplication for both model and HTML
  • Research if model deduplication is needed
  • Implement model deduplication if necessary
  • Add tests for deduplication in both model and HTML
  • Update test expectations
  • Document deduplication behavior

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp