Skip to content

Fix/invisible text in inputfield - #115

Merged
krishkhinchi merged 4 commits into
7-Blocks:mainfrom
Parshant-12:fix/invisible-text-in-inputfield
Jul 21, 2026
Merged

Fix/invisible text in inputfield#115
krishkhinchi merged 4 commits into
7-Blocks:mainfrom
Parshant-12:fix/invisible-text-in-inputfield

Conversation

@Parshant-12

@Parshant-12 Parshant-12 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

User description

Description

This PR resolves a critical UI accessibility issue on the login form where text becomes completely invisible when users paste credentials or use browser autofill.
Changes included:

  • Autofill Text Visibility: Added CSS overrides targeting the :-webkit-autofill pseudo-class on input fields. Browsers natively force a light background with dark text on autofilled inputs, which clashed with the application's dark theme (#0A0F1A). This fix uses a massive inset box-shadow to maintain the dark background and sets -webkit-text-fill-color to white, ensuring that pasted or autofilled emails and passwords remain highly visible and readable.

Related Issue

Fixes #113

Checklist

  • I have read the contributing guidelines
  • My code follows the project guidelines
  • I have completed testing of my changes
  • Documentation has been updated (if applicable)

Screenshots / Screen Recordings

Video.Project.15.3.mp4

Breaking Changes

No breaking changes.

ECSoC26 Submission

ECSoC26 contributors only — select your difficulty level by checking exactly one box below.
Leaving all boxes unchecked, or checking more than one, will cause the automation to fail.

  • ECSoC26-L1 – Beginner
  • ECSoC26-L2 – Intermediate
  • ECSoC26-L3 – Advanced

Summary by CodeRabbit

  • Style
    • Improved the appearance of autofilled input fields.
    • Ensured autofilled text and background colors remain consistent by overriding browser autofill styling.
    • Reduced visible flicker when autofill is applied by adjusting the transition behavior.

CodeAnt-AI Description

Keep autofilled login text visible

What Changed

  • Text in login input fields now stays readable when the browser autofills, pastes, or reuses saved credentials
  • Autofilled fields keep white text instead of disappearing against the dark form background

Impact

✅ Readable login fields
✅ Fewer autofill visibility issues
✅ Clearer sign-in experience

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Greptile Summary

This PR improves the visibility of autofilled login credentials. The main changes are:

  • Adds WebKit and standard autofill selectors for inputs.
  • Forces autofilled input text to remain white.
  • Delays browser-applied background and text color transitions.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
frontend/src/styles/index.css Adds global autofill styling to keep input text visible when browsers apply saved credentials.

Reviews (2): Last reviewed commit: "fix:codeant-ai recommanded fix" | Re-trigger Greptile

@codeant-ai

codeant-ai Bot commented Jul 21, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Incremental review completed ed114f9 Jul 21, 2026 · 15:36 15:37
✅ Reviewed your PR 8119447 Jul 21, 2026 · 14:34 14:38

Updated in place by CodeAnt AI · last 5 reviews

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation frontend Frontend development size/S Small contribution with limited scope. size:S Small size type:bug Fixes an existing bug or unexpected behavior. type:documentation Improves project documentation. ECSoC26 Official label for ECSoC26 event contributions. type:frontend Changes frontend or client-side code. ECSoC26-L1 Level 1 contribution for the ECSoC26 event. labels Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Input autofill selectors now set autofilled text to white and apply extended transitions for background and text color across standard and WebKit autofill states.

Changes

Autofill styling

Layer / File(s) Summary
Autofill text styling
frontend/src/styles/index.css
Autofilled input variants now set white text using -webkit-text-fill-color and color, with extended transitions for background-color and color.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: thelinuxguy-ssh, muntasiractive

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The CSS changes address #113 by overriding autofill styles and keeping input text visible with high contrast.
Out of Scope Changes check ✅ Passed The PR is narrowly scoped to autofill/input visibility styling and does not introduce unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title is concise and clearly matches the main change: fixing invisible text in input fields.
Description check ✅ Passed The description includes the required sections, issue link, checklist, screenshots, breaking changes, and exactly one ECSoC26 option.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@codeant-ai codeant-ai Bot added size:S Small size and removed size:S Small size labels Jul 21, 2026
@github-actions github-actions Bot added AI Artificial Intelligence and Machine Learning enhancement New feature or request type:feature Introduces a new feature or enhancement. labels Jul 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/styles/index.css`:
- Around line 287-291: Remove the blank lines between the declarations in the
affected stylesheet rule, specifically around -webkit-box-shadow,
-webkit-text-fill-color, and transition, so the declarations are contiguous and
Stylelint passes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4455500f-2aff-4b98-b2ec-d66c6768f092

📥 Commits

Reviewing files that changed from the base of the PR and between 6728fd1 and 8119447.

📒 Files selected for processing (1)
  • frontend/src/styles/index.css

Comment thread frontend/src/styles/index.css Outdated
Comment thread frontend/src/styles/index.css Outdated
Comment on lines +283 to +286
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: This fix only targets :-webkit-autofill, so it will not apply in non-WebKit engines (for example Firefox, which uses different autofill styling behavior). As written, users on those browsers can still get unreadable autofilled credentials; add a cross-browser autofill selector strategy instead of WebKit-only rules. [incomplete implementation]

Severity Level: Major ⚠️
❌ Non-WebKit login autofill may have unreadable text.
⚠️ Accessibility inconsistent across supported browsers (Chrome vs Firefox).
Steps of Reproduction ✅
1. Open the authentication UI in a non-WebKit browser (e.g., Firefox) and navigate to the
sign-in page implemented in `frontend/src/pages/SignIn.tsx:14-35`, which renders
`TextField` and `PasswordField` inputs with `autoComplete="email"` and
`autoComplete="current-password"` respectively.

2. Inspect the global CSS in `frontend/src/styles/index.css:283-292` where autofill
styling is defined only via WebKit-specific selectors: `input:-webkit-autofill`,
`input:-webkit-autofill:hover`, `input:-webkit-autofill:focus`,
`input:-webkit-autofill:active { ... }`.

3. Trigger browser autofill for the email and password fields on the sign-in or sign-up
forms (sign-up form uses the same field components with `autoComplete` attributes in
`frontend/src/pages/SignUp.tsx:86-117`) and observe that Firefox applies its own
`:-moz-autofill` styling while the WebKit-only CSS rules from `index.css` do not apply at
all.

4. Because the CSS does not target Firefox’s autofill pseudo-class, autofilled text uses
Firefox’s default colors against the dark themed backgrounds (`bg-white/[0.03]` in
`inputBase` at `frontend/src/components/auth/fields.tsx:11-15` and `--color-background:
#0C1220` at `index.css:33`), which can result in low-contrast or hard-to-read autofilled
credentials compared to the explicitly fixed, high-contrast WebKit behavior.

Fix in Cursor Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** frontend/src/styles/index.css
**Line:** 283:286
**Comment:**
	*Incomplete Implementation: This fix only targets `:-webkit-autofill`, so it will not apply in non-WebKit engines (for example Firefox, which uses different autofill styling behavior). As written, users on those browsers can still get unreadable autofilled credentials; add a cross-browser autofill selector strategy instead of WebKit-only rules.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment thread frontend/src/styles/index.css Outdated
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 30px #0A0F1A inset !important;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The autofill background is hardcoded to #0A0F1A globally for every input, but the app uses multiple input background tokens/shades (surface-container, white/[0.04], #0C1220, etc.). This creates mismatched autofill patches and inconsistent rendering outside the login form; use the same theme token/background as each input context instead of a single fixed color. [incorrect variable usage]

Severity Level: Major ⚠️
⚠️ Autofilled docs search field background mismatches panel styling.
⚠️ Settings inputs show inconsistent colors when autofilled.
Steps of Reproduction ✅
1. Note the global autofill override in `frontend/src/styles/index.css:283-292`, where
`input:-webkit-autofill` and its hover/focus/active variants are styled with
`-webkit-box-shadow: 0 0 0 30px #0A0F1A inset !important;`, effectively painting all
autofilled input backgrounds to a single hardcoded color.

2. Inspect other inputs in the app that use different themed backgrounds, such as the docs
search field in `frontend/src/pages/DocsPage.tsx:196-204` (`className` includes
`bg-white/[0.04]`) and settings text fields in `frontend/src/pages/Settings.tsx:4,8,18,22`
(`bg-surface-container`, `bg-surface-container-high`), which rely on theme tokens defined
in `index.css` (`--color-surface-container: #1c2026` at line 66, `--color-background:
#0C1220` at line 33).

3. In a WebKit-based browser (Chrome, Safari, Edge), trigger autofill on these non-auth
inputs: for example, autofill a previously saved CALLSIGN in `Settings.tsx:4` or use
browser autofill in the docs search input at `DocsPage.tsx:196-204`, and observe that the
global `input:-webkit-autofill` rule applies.

4. When autofill is applied, the inset box-shadow `#0A0F1A` from `index.css:287` overrides
the designed input backgrounds (e.g., the semi-transparent `bg-white/[0.04]` on the docs
search field or `bg-surface-container` on settings inputs), causing visually inconsistent
darker patches that no longer match their surrounding panels and theme tokens, even though
the original invisible-text bug being fixed exists only on the auth form.

Fix in Cursor Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** frontend/src/styles/index.css
**Line:** 287:287
**Comment:**
	*Incorrect Variable Usage: The autofill background is hardcoded to `#0A0F1A` globally for every input, but the app uses multiple input background tokens/shades (`surface-container`, `white/[0.04]`, `#0C1220`, etc.). This creates mismatched autofill patches and inconsistent rendering outside the login form; use the same theme token/background as each input context instead of a single fixed color.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@codeant-ai codeant-ai Bot added size:S Small size and removed size:S Small size labels Jul 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
frontend/src/styles/index.css (1)

286-290: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Separate prefixed and standard autofill selector lists.

If a supported browser does not parse :autofill, the entire grouped selector rule can be discarded, including the working :-webkit-autofill selectors. Keep the prefixed and standard variants in separate rules, or use a forgiving selector construct after confirming browser support. (developer.mozilla.org)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/styles/index.css` around lines 286 - 290, Separate the autofill
selectors in the stylesheet into distinct prefixed and standard rule blocks so
unsupported :autofill parsing cannot discard the working :-webkit-autofill
styles. Preserve the existing declarations and selector coverage for both
variants.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@frontend/src/styles/index.css`:
- Around line 286-290: Separate the autofill selectors in the stylesheet into
distinct prefixed and standard rule blocks so unsupported :autofill parsing
cannot discard the working :-webkit-autofill styles. Preserve the existing
declarations and selector coverage for both variants.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b0f87cc8-8911-46e9-9346-94281bdeed24

📥 Commits

Reviewing files that changed from the base of the PR and between 8119447 and ed114f9.

📒 Files selected for processing (1)
  • frontend/src/styles/index.css

@Parshant-12

Copy link
Copy Markdown
Contributor Author

@krishkhinchi now you can safely merge this fix

@Parshant-12

Copy link
Copy Markdown
Contributor Author

Please consider it under ECSoC26

@krishkhinchi
krishkhinchi merged commit b230c57 into 7-Blocks:main Jul 21, 2026
14 checks passed
@ecsoc-sentinel ecsoc-sentinel Bot removed the ECSoC26-L1 Level 1 contribution for the ECSoC26 event. label Jul 21, 2026
@ecsoc-sentinel ecsoc-sentinel Bot added the ECSoC26-L1 Level 1 contribution for the ECSoC26 event. label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Artificial Intelligence and Machine Learning bug Something isn't working documentation Improvements or additions to documentation ECSoC26-L1 Level 1 contribution for the ECSoC26 event. ECSoC26 Official label for ECSoC26 event contributions. enhancement New feature or request frontend Frontend development size/S Small contribution with limited scope. size:S Small size type:bug Fixes an existing bug or unexpected behavior. type:documentation Improves project documentation. type:feature Introduces a new feature or enhancement. type:frontend Changes frontend or client-side code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Invisible text in input fields upon pasting or autofilling due to color contrast

2 participants