Skip to content

Comments

Improved Splash Screen#1887

Closed
RohitKushvaha01 wants to merge 0 commit intoAcode-Foundation:mainfrom
RohitKushvaha01:main
Closed

Improved Splash Screen#1887
RohitKushvaha01 wants to merge 0 commit intoAcode-Foundation:mainfrom
RohitKushvaha01:main

Conversation

@RohitKushvaha01
Copy link
Member

No description provided.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 20, 2026

Greptile Summary

Attempted to improve the splash screen by replacing CSS pseudo-elements (::before and ::after) with a real DOM element approach, and reformatted src/main.js from tabs to spaces.

Critical Issues Found

  • Missing splash element: The JavaScript references getElementById("splash") but no element with that ID exists in the HTML, causing the splash screen to be non-functional
  • Invalid HTML structure: The file contains duplicate <body>, <script>, <style>, and <wc-page> tags, creating malformed HTML that will fail validation and cause unpredictable browser behavior
  • Incomplete refactoring: The old CSS pseudo-element splash code (lines 206-251) was left in place instead of being removed when switching to the DOM element approach

The src/main.js changes are purely cosmetic (tabs → spaces) and don't affect functionality.

Confidence Score: 0/5

  • This PR will break the application with malformed HTML and non-functional splash screen
  • The HTML structure is critically broken with duplicate tags and missing required elements. The splash screen JavaScript will fail silently, and the duplicate body/script tags will cause unpredictable rendering behavior. This requires significant rework before merging.
  • www/index.html requires immediate attention to fix HTML structure errors and add missing splash element

Important Files Changed

Filename Overview
www/index.html attempted to replace CSS pseudo-element splash with real DOM element, but introduced critical HTML structure errors: missing #splash element, duplicate body/script/style tags
src/main.js formatting change only - replaced tabs with spaces throughout the file, no functional changes

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Page Load] --> B[DOMContentLoaded Event]
    B --> C[updateSplash function]
    C --> D{getElementById splash}
    D -->|Element exists| E[Update splash-version text]
    D -->|Element missing| F[Return early - CURRENT BUG]
    E --> G[Update splash-message text]
    G --> H[MutationObserver watches body attributes]
    H --> I[Listen for data-version & data-small-msg changes]
    
    style F fill:#ff6b6b
    style D fill:#ffd93d
Loading

Last reviewed commit: 6ee26a0

@RohitKushvaha01 RohitKushvaha01 marked this pull request as draft February 20, 2026 09:52
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

www/index.html Outdated
Comment on lines 180 to 181
const splash = document.getElementById("splash");
if (!splash) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getElementById("splash") will always return null - there's no element with id="splash" in the HTML body

Suggested change
const splash = document.getElementById("splash");
if (!splash) return;
const splash = document.getElementById("splash");
if (!splash) {
// Create splash element if it doesn't exist
const splashDiv = document.createElement("div");
splashDiv.id = "splash";
splashDiv.innerHTML = '<div class="splash-version"></div><div class="splash-message"></div>';
document.body.appendChild(splashDiv);
}

www/index.html Outdated
Comment on lines 262 to 263
<wc-page id="root" class="primary"></wc-page>
</body>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate <wc-page> element and closing </body> tag

Suggested change
<wc-page id="root" class="primary"></wc-page>
</body>
</html>

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 20, 2026

Additional Comments (3)

www/index.html
duplicate <script src="cordova.js"> and splash styles - these exact styles already exist in the <head> section above (lines 97-171)


www/index.html
duplicate <script src="./build/main.js">, <link>, and <title> - already defined in lines 174-201


www/index.html
body element opened twice - there's already an opening <body> in the removed old styles section, and this creates invalid HTML structure

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