Skip to content

Conversation

@Maulik176
Copy link

@Maulik176 Maulik176 commented Jan 27, 2026

Closes #1761

Tag: community-submission

This PR adds the GlobalOnboard demo application under /community.

It demonstrates multilingual onboarding flows using Lingo.dev SDK and follows repository contribution guidelines.

@sumitsaurabh927 Reopened it becuase it was not asssigned earlier. Requesting you to merge this PR.

Summary by CodeRabbit

  • New Features

    • Locale-aware onboarding editor with per-locale overrides, live preview, QA tools, and downloadable locale-specific onboarding packs
    • In-app translation endpoint and client integration for on-demand translations
    • Theme controls (Light/Dark/System) and reusable UI primitives (buttons, dropdowns, toggles, providers)
  • Localization

    • UI and template content added for English, Spanish, French, and Hindi; locale selection, caching, and helper utilities
  • Documentation

    • New README detailing architecture, local development, and localization workflow
  • Improvements

    • Hardened onboarding pack export and safer task editing; tightened UI defaults

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

Adds a new GlobalOnboard demo app under community/global-onboard: a Next.js + TypeScript multi-locale onboarding editor with localization data, Lingo translation SDK integration and server API, UI primitives, theme/layout, tooling configs, README, and export/download support.

Changes

Cohort / File(s) Summary
Project config & toolchain
community/global-onboard/package.json, community/global-onboard/tsconfig.json, community/global-onboard/next.config.ts, community/global-onboard/postcss.config.mjs, community/global-onboard/eslint.config.mjs, community/global-onboard/biome.json
New project manifests, scripts, TypeScript and Next config, PostCSS, ESLint and Biome settings for the demo app.
i18n config & core libs
community/global-onboard/i18n.json, community/global-onboard/lib/i18n.ts, community/global-onboard/lib/lingo.ts, community/global-onboard/lib/lingo-client.ts
Localization manifest and runtime helpers: locale types, lookup functions, Lingo SDK singleton and translator, and a client helper calling the translate API with error handling and fallbacks.
API route
community/global-onboard/app/api/translate/route.ts
New POST endpoint validating payloads (text length, locale), invoking translateWithLingo, and returning structured success/error responses.
App layout & theming
community/global-onboard/app/layout.tsx, community/global-onboard/app/globals.css, community/global-onboard/components/theme-provider.tsx, community/global-onboard/components/mode-toggle.tsx, community/global-onboard/next-env.d.ts
Root layout, global Tailwind CSS tokens, ThemeProvider wrapper, mode toggle component, and Next.js TypeScript env declarations.
Main page & UI
community/global-onboard/app/page.tsx
Client-side onboarding editor with per-locale overrides, translation caching, QA tooling, live preview, task editing, and downloadable HTML pack (large, stateful component).
UI primitives
community/global-onboard/components/ui/button.tsx, community/global-onboard/components/ui/dropdown-menu.tsx
Reusable UI components: CVA-based Button with variants and a Radix-based DropdownMenu wrapper exposing many primitives and styling.
Utilities
community/global-onboard/lib/utils.ts
cn helper combining clsx and tailwind-merge.
Localization data
community/global-onboard/data/ui.en.json, community/global-onboard/data/ui.es.json, community/global-onboard/data/ui.fr.json, community/global-onboard/data/ui.hi.json, community/global-onboard/data/onboarding_template.en.json, community/global-onboard/data/onboarding_template.es.json, community/global-onboard/data/onboarding_template.fr.json, community/global-onboard/data/onboarding_template.hi.json
Added UI strings and onboarding templates for English, Spanish, French, and Hindi locales.
Docs & changeset
community/global-onboard/README.md, .changeset/fine-jeans-beam.md
Project README and changeset documenting a patch bump and notes about onboarding pack export and task editing behavior.
Tooling / docs blob
nboard
Large help/manual text added (documentation content only).

Sequence Diagram

sequenceDiagram
    participant User
    participant App as GlobalOnboard (client)
    participant API as /api/translate
    participant SDK as Lingo SDK
    participant Store as LocalStorage/Cache

    User->>App: Edit text / choose target locale
    App->>App: Validate input (length, locale)
    alt valid
        App->>API: POST { text, targetLocale }
        API->>API: Validate payload
        API->>SDK: localizeText(source="en", targetLocale)
        SDK-->>API: translated text
        API-->>App: { translated }
        App->>Store: cache translation (per-locale)
        App->>App: update preview & state (overrides/QA)
        App-->>User: display translated content
    else invalid
        App-->>User: show validation error
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • sumitsaurabh927
  • vrcprl

Poem

🐇 I hopped through locales, nibbling strings with glee,
Four tongues now ready, packs packed snug for tea,
I translated, previewed, and nudged each little task,
QA checked the carrots — no rabbit need ask,
Hooray for onboarding, now spry as can be!

🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete. It lacks the required template structure, including a detailed summary section, comprehensive changes list, testing section with business logic tests, and visuals (if applicable). Expand the description to follow the template: add a one-sentence summary, detailed changes list, testing section with checkboxes for test validation, and visuals section. Include the changeset information referenced in the PR comments.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly summarizes the main change: adding a global-onboard demo app. It is specific, concise, and directly related to the changeset.
Linked Issues check ✅ Passed The PR fulfills the primary requirements of #1761: it adds a demo app to /community directory, includes a README documenting the app's functionality and Lingo.dev features, and demonstrates multilingual onboarding flows using Lingo.dev SDK.
Out of Scope Changes check ✅ Passed All changes are directly aligned with the PR objectives. The changeset, documentation, configurations, data files, and components all serve the goal of implementing a GlobalOnboard demo app showcasing Lingo.dev features.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

@sumitsaurabh927
Copy link
Contributor

Changeset missing

@Maulik176 Maulik176 force-pushed the feat/community-global-onboard branch from 3c2d4d2 to 6e27d00 Compare January 27, 2026 10:51
@Maulik176
Copy link
Author

@sumitsaurabh927 verfied commits with changset @sumitsaurabh927 sorry for the miss

@Maulik176
Copy link
Author

@sumitsaurabh927
image

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🤖 Fix all issues with AI agents
In @.changeset/fine-jeans-beam.md:
- Around line 1-17: The changeset .changeset/fine-jeans-beam.md currently marks
many packages (e.g. "@compiler/demo-next", "@replexica/integration-directus",
"replexica", "@replexica/sdk", "lingo.dev", "@lingo.dev/_compiler", etc.) as
major and uses a non-descriptive summary "mr new"; narrow the scope to only the
package(s) actually affected by this PR by removing unrelated package entries
and set the correct bump type (patch/minor/major) for each remaining package,
and replace the summary with a clear release note describing the change
introduced by this PR (what changed and why) so the changeset accurately
reflects intended releases.

In `@community/global-onboard/app/page.tsx`:
- Around line 646-688: The generated document interpolates unescaped user
content (docWelcome, previewWelcome, effectiveTemplate.companyName,
effectiveTemplate.role, task.title, task.description) in handleDownloadPack
which can lead to HTML injection; fix by adding and using an HTML-escaping
helper (e.g., escapeHtml) and apply it to docWelcome/previewWelcome,
effectiveTemplate.companyName, effectiveTemplate.role and to task.title and
task.description when building docTasks and docHtml so all user-provided strings
are escaped before being concatenated into the HTML string.
- Around line 566-579: When editing a task in handleTaskChange, detect when the
original task had source === "template" and convert it to a custom task so edits
propagate to non‑English previews: inside setTasks (in the handleTaskChange
function) update next[index] to also set source: "custom" when
currentTask?.source === "template"; then, as you already do for custom tasks,
call clearCustomTranslationsForTask(currentTask.id) when the prior text differs
from the new value (use currentTask to compare). This ensures edited template
tasks become custom and cached translations/overrides are cleared.

In `@community/global-onboard/components/ui/button.tsx`:
- Around line 36-44: The Button component currently can render a native button
which defaults to submit inside forms; modify the React.forwardRef component
(Button) so a native button gets a safe default type="button". Add a type prop
with default 'button' in the destructuring (e.g., ({ className, variant, size,
asChild = false, type = "button", ...props }, ref)) and ensure you only pass
that type when rendering the native element (Comp === "button") so asChild/Slot
consumers can still provide their own type; keep using cn(buttonVariants(...))
and forward ref/props as before.

In `@community/global-onboard/components/ui/dropdown-menu.tsx`:
- Around line 25-37: The SubTrigger currently uses
DropdownMenuPrimitive.ItemIndicator which only renders for checkbox/radio items;
replace the ItemIndicator inside DropdownMenuPrimitive.SubTrigger with a plain
span (e.g., <span aria-hidden="true">›</span>) so the submenu arrow always
displays—keep the same styling (className "ml-auto") and preserve placement
alongside children and existing props/ref in DropdownMenuPrimitive.SubTrigger to
maintain layout and accessibility.

In `@community/global-onboard/next-env.d.ts`:
- Around line 1-3: The file next-env.d.ts currently imports a generated file
("./.next/dev/types/routes.d.ts") which breaks on clean checkouts/CI; remove the
import statement referencing "./.next/dev/types/routes.d.ts" from next-env.d.ts
so the ambient triple-slash references to Next remain but no longer depend on
build output, leaving only the top two reference lines (/// <reference
types="next" /> and /// <reference types="next/image-types/global" />).

In `@community/global-onboard/package.json`:
- Around line 5-9: The "lint" script in package.json currently runs "eslint"
with no file target which can error under legacy ESLint configs; update the
"lint" script entry (the "lint" key in the scripts object) to explicitly target
files (e.g., change to "eslint ." or use "next lint") so ESLint runs
consistently across config systems; modify the scripts block accordingly.
- Around line 18-21: The package.json pins vulnerable versions of next, react,
and react-dom (see dependencies "next", "react", "react-dom"); update those
dependency entries to at least next@16.0.7, react@19.2.1, and react-dom@19.2.1
(you can leave next-themes as-is) to apply the CVE-2025-55182 patches, run your
package manager install, and verify the lockfile and build/tests pass.

In `@community/global-onboard/README.md`:
- Around line 14-15: Fix the markdownlint issues by (1) correcting the heading
indentation for "### 🏅 Lingo Product Scorecard" so it uses proper leading
hashes with a single space, (2) inserting a blank line immediately before the
scorecard table to satisfy MD058, (3) adding language identifiers (use "text")
to the fenced code blocks that contain the ASCII diagram and the file tree (the
three ``` fences around the blocks that start with "HR inputs" and "app/"), and
(4) wrapping the bare URL "http://localhost:3000" in angle brackets (i.e.,
<http://localhost:3000>) to resolve MD034; locate these edits in the README
sections containing the ASCII diagram, the scorecard heading/table, the Visit
localhost line, and the file tree block.
🧹 Nitpick comments (5)
community/global-onboard/components/mode-toggle.tsx (1)

27-29: Consider localizing theme menu options for consistency.

The dropdown menu items ("Light", "Dark", "System") are hardcoded in English, while the rest of the app uses i18n for UI strings. For full localization consistency, these labels could be added to the ui.*.json locale files and retrieved via the i18n helper.

community/global-onboard/app/globals.css (1)

31-37: Transition on background-color won't animate gradient backgrounds.

The --background variable contains a linear-gradient(...), not a solid color. CSS transitions cannot animate between gradient values via background-color. The transition declaration on Line 35 will have no effect on the background.

Consider either:

  1. Using a solid color fallback for smoother theme transitions
  2. Removing the background-color from the transition if gradient changes are acceptable
  3. Using a pseudo-element overlay technique for animated theme transitions
community/global-onboard/app/api/translate/route.ts (1)

23-25: Inconsistent error message.

The error message "Missing welcome note" is domain-specific, but this appears to be a generic translation endpoint. Consider using a more generic message like "Missing text field" for API consistency.

Suggested fix
   if (!text || typeof text !== "string") {
-    return NextResponse.json({ error: "Missing welcome note" }, { status: 400 });
+    return NextResponse.json({ error: "Missing or invalid text field" }, { status: 400 });
   }
community/global-onboard/lib/lingo-client.ts (1)

29-32: Edge case: empty string translation.

The check !payload.translated would treat an empty string "" as an error case. While unlikely in practice for translation results, if strict handling is desired, consider checking for undefined explicitly.

Optional stricter check
-  if (!payload.translated) {
+  if (payload.translated === undefined) {
     throw new Error(payload.error || "Translation unavailable");
   }
community/global-onboard/app/page.tsx (1)

452-495: Debounce welcome-note translations to reduce request churn.

This effect fires on every keystroke; a small debounce will prevent API spam and reduce UI churn.

💡 Possible debounce tweak
   useEffect(() => {
     if (!shouldTranslate) {
       return;
     }

     let cancelled = false;
-    const cached = welcomeCache.current[selectedLocale];
-    if (cached && cached.source === welcomeNote) {
-      setTranslatedWelcome(cached.value);
-      return;
-    }
-
-    setIsTranslating(true);
-    setTranslationError(false);
-    startTranslationJob();
-    translateWelcomeNote(welcomeNote, selectedLocale)
-      .then((result) => {
-        if (cancelled) return;
-
-        welcomeCache.current[selectedLocale] = {
-          source: welcomeNote,
-          value: result,
-        };
-        setTranslatedWelcome(result);
-      })
-      .catch(() => {
-        if (cancelled) return;
-        setTranslationError(true);
-        setTranslatedWelcome(welcomeNote);
-      })
-      .finally(() => {
-        if (!cancelled) {
-          setIsTranslating(false);
-        }
-        finishTranslationJob();
-      });
+    const timeout = setTimeout(() => {
+      if (cancelled) return;
+      const cached = welcomeCache.current[selectedLocale];
+      if (cached && cached.source === welcomeNote) {
+        setTranslatedWelcome(cached.value);
+        return;
+      }
+
+      setIsTranslating(true);
+      setTranslationError(false);
+      startTranslationJob();
+      translateWelcomeNote(welcomeNote, selectedLocale)
+        .then((result) => {
+          if (cancelled) return;
+
+          welcomeCache.current[selectedLocale] = {
+            source: welcomeNote,
+            value: result,
+          };
+          setTranslatedWelcome(result);
+        })
+        .catch(() => {
+          if (cancelled) return;
+          setTranslationError(true);
+          setTranslatedWelcome(welcomeNote);
+        })
+        .finally(() => {
+          if (!cancelled) {
+            setIsTranslating(false);
+          }
+          finishTranslationJob();
+        });
+    }, 400);
 
     return () => {
       cancelled = true;
+      clearTimeout(timeout);
     };
   }, [selectedLocale, shouldTranslate, welcomeNote]);

@sumitsaurabh927
Copy link
Contributor

@Maulik176 please resolve all the comments

@Maulik176
Copy link
Author

@sumitsaurabh927 All the issues reported by coderabbit are now resolved, Requesting you to please merge the PR.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@community/global-onboard/app/page.tsx`:
- Around line 301-321: The cached custom translations can become stale because
they lack source-text tracking; update the cache shape (CustomTranslationCache)
to store titleSource and descriptionSource for each task and, inside the tasks
mapping (the tasks.map block that references templateTasksById and
localeCustomTranslations), only use cached title/description when
cache.titleSource === task.title and cache.descriptionSource ===
task.description respectively (otherwise fall back to task values); also update
the logic used by clearCustomTranslationsForTask and the similar code around
lines 356-399 to clear or ignore cache entries when the source texts differ so
edited source text won't resurrect stale translations.
- Around line 455-489: When the effect bails out early (when shouldTranslate is
false or when a cache hit is returned from
welcomeCache.current[selectedLocale]), ensure isTranslating is reset: call
setIsTranslating(false) before returning and, if you already called
startTranslationJob(), also call finishTranslationJob() so the job state is
cleared; update the early-return branches in the useEffect that references
shouldTranslate, welcomeCache, selectedLocale, setIsTranslating,
startTranslationJob, and finishTranslationJob to perform these resets.

In `@community/global-onboard/README.md`:
- Around line 55-57: Replace the personal fork URL in the README's git clone
command with the main repository's clone URL and update the subsequent cd
command if the repository name differs; specifically, edit the code block
containing the git clone line and the cd LingoHack25-GlobalOnboard line so users
clone the main repo (not
https://github.com/Maulik176/LingoHack25-GlobalOnboard.git) and cd into the
correct top-level repository directory name.

@Maulik176
Copy link
Author

@sumitsaurabh927 3 more issues by Coderabbit.. All the issues reported by coderabbit are now resolved, Requesting you to please merge the PR.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@community/global-onboard/app/page.tsx`:
- Around line 1357-1362: The overlay div rendering when hasTranslationsInFlight
uses a non-existent Tailwind class "rounded-4xl"; replace it with the same
border-radius used by the parent (rounded-[30px]) so the overlay matches the
parent container's rounded corners—locate the JSX block that checks
hasTranslationsInFlight and update the className on that absolute overlay div
accordingly.
🧹 Nitpick comments (1)
community/global-onboard/README.md (1)

16-21: Minor: Table row has inconsistent leading whitespace.

Lines 17-20 have a leading space before the | character, which may cause rendering inconsistencies in some markdown parsers.

🧹 Suggested fix
 | Lingo product | How GlobalOnboard uses it | Why it matters |
- | --- | --- | --- |
- | **Lingo CLI** | Generates `data/ui.{locale}.json` and `data/onboarding_template.{locale}.json` from English sources via `npx lingo.dev@latest run`. | Demonstrates the official static localization workflow. |
- | **Lingo JavaScript SDK** | Translates the welcome note and every custom task at runtime with caching, spinners, and graceful fallbacks. | Shows dynamic personalization for each employee preview. |
- | **Lingo CI** | `.github/workflows/i18n.yml` runs `npx lingo.dev@latest ci --pull-request` whenever English JSON or `i18n.json` changes. | Proves translation automation and GitHub integration end-to-end. |
+| --- | --- | --- |
+| **Lingo CLI** | Generates `data/ui.{locale}.json` and `data/onboarding_template.{locale}.json` from English sources via `npx lingo.dev@latest run`. | Demonstrates the official static localization workflow. |
+| **Lingo JavaScript SDK** | Translates the welcome note and every custom task at runtime with caching, spinners, and graceful fallbacks. | Shows dynamic personalization for each employee preview. |
+| **Lingo CI** | `.github/workflows/i18n.yml` runs `npx lingo.dev@latest ci --pull-request` whenever English JSON or `i18n.json` changes. | Proves translation automation and GitHub integration end-to-end. |

this are just some CSS changes i dont know what it has to do with PR quality

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Author

@Maulik176 Maulik176 left a comment

Choose a reason for hiding this comment

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

@sumitsaurabh927 - These are unnecessary changes that Bot is requesting.

@Maulik176
Copy link
Author

image All reviews are resolved, this PR is ready to be merged. @sumitsaurabh927

@sumitsaurabh927
Copy link
Contributor

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

✅ Actions performed

Full review triggered.

@Maulik176
Copy link
Author

image @sumitsaurabh927 It has passed the full review. 👍

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@community/global-onboard/app/api/translate/route.ts`:
- Around line 6-33: The POST handler accepts unbounded text and must enforce
request size limits to prevent abuse: add a MAX_TEXT_LENGTH constant and
validate the extracted text in the POST function (after reading payload) to
return a 413 response when text.length > MAX_TEXT_LENGTH; also consider checking
request.headers['content-length'] before parsing to reject large bodies early.
In addition, add optional lightweight protections around translateWithLingo
usage such as requiring a demo token header or integrating a rate-limiter
middleware (or simple in-memory counter) that validates a token/rate before
calling translateWithLingo, and ensure error responses reference the same
SUPPORTED_LOCALES/TranslationPayload checks already present.

In `@community/global-onboard/app/globals.css`:
- Around line 31-36: The body currently sets transition: background-color 0.3s
ease but uses --background as a gradient (body and --background), which cannot
be animated; fix by either using a solid color CSS variable for --background and
keep transition on background-color, or change the implementation to animate a
layered background (create a ::before/::after overlay using background-image:
var(--background) and animate its opacity) and leave body.transition to animate
opacity and color (e.g., transition: opacity 0.3s ease, color 0.3s ease); update
the body rule and any theme-switch logic to target the chosen approach (body
selector, --background variable, and the transition property).

In `@community/global-onboard/app/head.tsx`:
- Around line 1-8: Remove the dead head.tsx file: delete the module that exports
default function Head (the component returning the two favicon <link> tags)
because favicon is already configured in layout.tsx metadata; also remove any
imports or references to Head elsewhere so the project builds cleanly after
deleting head.tsx.
🧹 Nitpick comments (1)
community/global-onboard/package.json (1)

18-30: Consider aligning eslint-config-next version with next.

next is pinned at 16.0.7 while eslint-config-next is at 16.0.3. For consistency and to ensure lint rules match the runtime behavior, consider updating eslint-config-next to 16.0.7 as well.

🔧 Suggested fix
-    "eslint-config-next": "16.0.3",
+    "eslint-config-next": "16.0.7",

@sumitsaurabh927 sumitsaurabh927 changed the title feat(community): add global-onboard demo app (closes #1761) feat: add global-onboard demo app (closes #1761) Jan 29, 2026
@Maulik176
Copy link
Author

@sumitsaurabh927 Commit 9171c68 solves this issues. please merge

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@community/global-onboard/app/api/translate/route.ts`:
- Around line 37-45: In the catch block after calling translateWithLingo, stop
returning the raw error.message to clients; instead log the full error
(console.error or processLogger) for diagnostics and return a generic
client-facing error string like "Translation service unavailable" via
NextResponse.json with status 500; update the catch handling around
translateWithLingo / NextResponse.json and remove usage of the error-derived
`message` for the response while keeping the error details in logs.

@Maulik176
Copy link
Author

@sumitsaurabh927 It has passed the full review. again👍
image

@sumitsaurabh927
Copy link
Contributor

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@community/global-onboard/package.json`:
- Around line 1-34: The package.json pins vulnerable versions of Next.js and
React; update the dependency entries for "next" to "16.0.10", and both "react"
and "react-dom" to "19.2.4" (also bump "eslint-config-next" in devDependencies
to "16.0.10" if a matching patch exists) in the package.json for the
globalonboard project, then reinstall dependencies and run the test/lint/audit
pipeline to verify compatibility and that no regressions were introduced.

In `@community/global-onboard/tailwind.config.ts`:
- Around line 1-16: The tailwind.config.ts is a legacy Tailwind v3-style config
(the Config const and properties like darkMode and content) but this project
uses Tailwind v4; either delete this file or migrate its settings into a
v4-compatible approach: remove export default config and instead move settings
such as darkMode: "class" and the content globs into your v4 CSS-based
configuration (or create a v4 config file format) and remove TypeScript-specific
config, ensuring harmony with `@theme` directives in globals.css and
`@tailwindcss/postcss` in postcss.config.mjs.
🧹 Nitpick comments (2)
community/global-onboard/app/page.tsx (2)

112-118: Avoid duplicating locale labels.
LOCALE_BADGE_LABELS repeats getLocaleLabel, which can drift when locales change. Consider deriving badge labels from the canonical label helper.

♻️ Possible refactor
-const LOCALE_BADGE_LABELS: Record<Locale, string> = {
-  en: "English (en)",
-  es: "Spanish (es)",
-  fr: "French (fr)",
-  hi: "Hindi (hi)",
-};
+const LOCALE_BADGE_LABELS: Record<Locale, string> = SUPPORTED_LOCALES.reduce(
+  (acc, locale) => {
+    acc[locale] = `${getLocaleLabel(locale)} (${locale})`;
+    return acc;
+  },
+  {} as Record<Locale, string>,
+);

136-148: Avoid silent empty keys in buildFieldKey.
Returning "" can cause hard-to-track collisions if a new field type appears. Prefer an explicit failure.

🛠️ Safer default
     case "taskDescription":
       return `task:${field.taskId}:description`;
     default:
-      return "";
+      throw new Error("Unhandled field type in buildFieldKey");
   }
 }

@Maulik176
Copy link
Author

@sumitsaurabh927 Can you do some configuration where if you call coderabbit it lists down all issues at once.
it seems to be in a repititive flow. if there are issue it show them all once.

for now it is resolved. please merge

@Maulik176
Copy link
Author

Maulik176 commented Jan 29, 2026

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

✅ Actions performed

Full review triggered.

1 similar comment
@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Fix all issues with AI agents
In `@community/global-onboard/app/globals.css`:
- Around line 1-7: Enable Tailwind directive parsing in Biome by updating your
biome.json CSS parser config: in the top-level "css" section add/modify a
"parser" object and set "tailwindDirectives": true so Biome accepts
`@import/`@source/@custom-variant/@theme in globals.css; update the same setting
across other workspace configs if you have multiple biome.json files to cover
the other affected files (the key to change is the
"css.parser.tailwindDirectives" boolean).

In `@community/global-onboard/app/page.tsx`:
- Around line 825-844: The labels are not programmatically linked to their
inputs; update the two input blocks (the ones using companyName/setCompanyName
and role/setRole) by adding matching id attributes on the inputs (e.g.,
id="companyName" and id="role") and corresponding htmlFor attributes on their
label elements so screen readers and click-to-focus work correctly; ensure id
values are unique across the form and follow the same pattern for any other
label/input pairs in this component.

In `@community/global-onboard/lib/lingo-client.ts`:
- Around line 24-31: The success-path call to response.json() can throw on
empty/non-JSON 200 responses and currently bubbles a SyntaxError; update the
handling in lingo-client.ts where the code reads the success payload (the second
const payload = (await response.json()) as TranslationResponse and subsequent if
(!payload.translated) check) to catch JSON parsing errors: attempt
response.json() inside a try/catch (or use .catch(() => ({})) ) and treat a
parse failure as an empty payload so you throw the same consistent
Error(payload.error || "Translation unavailable") rather than leaking a
SyntaxError.

In `@community/global-onboard/lib/lingo.ts`:
- Around line 38-50: The string branch after calling sdk.localizeText can return
an empty string and should fall back to the original text; update the logic
where you check "if (typeof result === 'string')" (the result from
getEngine().localizeText) to return result if non-empty otherwise return the
original text variable, mirroring the object branch's nullish fallback for
outputText.

In `@nboard`:
- Around line 1-314: The root-level file named "nboard" contains a stray less
pager help manual (the long "less" usage text) and is not referenced by the
codebase; either delete the "nboard" file from the repo to remove this artifact,
or if it must be kept, add a short header comment explaining its purpose and add
a reference/link to it from project documentation (e.g., README) so it’s
discoverable; update the PR to remove the file or include the documentation
change and explain the decision in the commit message.
🧹 Nitpick comments (1)
community/global-onboard/lib/i18n.ts (1)

54-61: Hoist locale labels to a module‑level constant.
Avoids re-allocating the labels object on every call and keeps the function lean.

♻️ Suggested refactor
+const LOCALE_LABELS: Record<Locale, string> = {
+  en: "English",
+  es: "Español",
+  fr: "Français",
+  hi: "हिन्दी",
+};
+
 export function getLocaleLabel(locale: Locale): string {
-  const labels: Record<Locale, string> = {
-    en: "English",
-    es: "Español",
-    fr: "Français",
-    hi: "हिन्दी",
-  };
-  return labels[locale];
+  return LOCALE_LABELS[locale];
 }

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@community/global-onboard/app/layout.tsx`:
- Around line 24-35: The ModeToggle component is unused and current
ThemeProvider config prevents switching; either remove ModeToggle or enable
theme switching by updating the ThemeProvider and HTML: remove
forcedTheme="dark" from ThemeProvider, set enableSystem={true} (or desired
value) and remove the hardcoded className="dark" on the <html> element so
next-themes can manage the class, and ensure any ModeToggle import/usage is
added where intended (refer to ModeToggle and ThemeProvider in layout.tsx and
any setTheme usages).

In `@community/global-onboard/package.json`:
- Around line 1-34: The package.json currently pins "next" to 16.0.10 which is
vulnerable to CVE-2026-23864; update the "next" dependency value to a patched
release (preferably "16.1.5" or at minimum "16.0.11"), then reinstall
dependencies (npm/yarn/pnpm install) to regenerate the lockfile and rebuild the
project to ensure no breakages; verify the app builds and test suites/lint pass
after the upgrade.
🧹 Nitpick comments (2)
community/global-onboard/app/page.tsx (2)

151-165: Consider extracting sub-components for maintainability.

This component is ~1300 lines with complex state management. For a demo app this is acceptable, but consider extracting reusable pieces (e.g., HrWorkspace, EmployeePreview, QaPanel) if the app grows or needs maintenance.


748-756: Consider using HTML extension for downloaded file.

The file content is HTML but uses application/msword MIME type and .doc extension as a workaround for Word compatibility. This works, but using text/html with .html extension would be more accurate and portable across applications.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@community/global-onboard/app/page.tsx`:
- Around line 748-756: The immediate call to URL.revokeObjectURL(url) after
link.click() can abort downloads in some browsers; change the cleanup to revoke
the object URL asynchronously (e.g., via setTimeout or an
onfocus/onvisibilitychange fallback) so the browser has time to start the
download. Locate the download logic where blob, url, link, link.click(), and
URL.revokeObjectURL(url) are used and replace the synchronous revoke with a
deferred revoke (retain the same url variable name and ensure revoke runs after
a short delay or when the document regains focus).

@Maulik176
Copy link
Author

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@community/global-onboard/package.json`:
- Around line 11-31: Update the Next.js dependency and its ESLint config to the
patched 16.1.6 release: change the "next" version string from "16.0.10" to
"16.1.6" and update "eslint-config-next" from "16.0.10" to "16.1.6" in
package.json so both remain in lockstep and receive the security fixes; after
editing, run your install (npm/yarn/pnpm) and test dev/build to ensure no
regressions.
🧹 Nitpick comments (4)
community/global-onboard/app/layout.tsx (2)

24-24: Redundant className="dark" when using forcedTheme.

Since forcedTheme="dark" is set on ThemeProvider, next-themes will automatically add the dark class. The hardcoded className="dark" on <html> is redundant.

♻️ Suggested cleanup
-    <html lang="en" className="dark" suppressHydrationWarning>
+    <html lang="en" suppressHydrationWarning>

30-36: Remove the unused ModeToggle component.

The ModeToggle component at components/mode-toggle.tsx is never imported or used anywhere in the codebase. Additionally, with forcedTheme="dark" and enableSystem={false} in the ThemeProvider, any theme switching logic would be disabled anyway. Delete the unused component to reduce code clutter.

community/global-onboard/app/page.tsx (2)

885-898: Missing label associations for task inputs.

The task title and description inputs lack id attributes and associated <label> elements with htmlFor, which impacts accessibility (screen readers and click-to-focus).

Consider wrapping each input with a <label> or adding aria-label attributes:

♿ Suggested accessibility improvement
+                        <label htmlFor={`task-${task.id}-title`} className="sr-only">
+                          Task title
+                        </label>
                         <input
+                          id={`task-${task.id}-title`}
+                          aria-label="Task title"
                           className="w-full rounded-lg border border-slate-200 px-3 py-2 text-sm font-medium text-slate-900 ..."
                           value={task.title}
                           onChange={(event) =>
                             handleTaskChange(index, "title", event.target.value)
                           }
                         />
+                        <label htmlFor={`task-${task.id}-description`} className="sr-only">
+                          Task description
+                        </label>
                         <textarea
+                          id={`task-${task.id}-description`}
+                          aria-label="Task description"
                           className="h-24 w-full resize-none rounded-lg border border-slate-200 ..."
                           value={task.description}
                           onChange={(event) =>
                             handleTaskChange(index, "description", event.target.value)
                           }
                         />

913-926: Missing label association for welcome note textarea.

The welcome note textarea lacks an id and the label lacks htmlFor, impacting accessibility.

♿ Suggested fix
-                <label className="text-xs font-semibold uppercase text-slate-500 dark:text-slate-300">
+                <label
+                  htmlFor="welcomeNote"
+                  className="text-xs font-semibold uppercase text-slate-500 dark:text-slate-300"
+                >
                   Your welcome note to the new hire
                 </label>
                 <textarea
+                  id="welcomeNote"
                   className="mt-2 h-28 w-full resize-none rounded-xl ..."

@Maulik176
Copy link
Author

Maulik176 commented Jan 29, 2026

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

@Maulik176: I'll trigger a full review of all the changes.

Regarding your earlier question about listing all issues at once - full reviews already do show all issues together in a single review. Each full review examines all the files and provides comprehensive feedback in one go, rather than incrementally.

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

✅ Actions performed

Full review triggered.

@Maulik176
Copy link
Author

image @sumitsaurabh927 Requesting your merge approval

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Demo Apps, Integrations etc & Win Exclusive Lingo.dev Swag!

2 participants