-
Notifications
You must be signed in to change notification settings - Fork 829
feat: add global-onboard demo app (closes #1761) #1890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add global-onboard demo app (closes #1761) #1890
Conversation
📝 WalkthroughWalkthroughAdds a new GlobalOnboard demo app under Changes
Sequence DiagramsequenceDiagram
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
|
Changeset missing |
3c2d4d2 to
6e27d00
Compare
|
@sumitsaurabh927 verfied commits with changset @sumitsaurabh927 sorry for the miss |
There was a problem hiding this 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.*.jsonlocale files and retrieved via the i18n helper.community/global-onboard/app/globals.css (1)
31-37: Transition onbackground-colorwon't animate gradient backgrounds.The
--backgroundvariable contains alinear-gradient(...), not a solid color. CSS transitions cannot animate between gradient values viabackground-color. The transition declaration on Line 35 will have no effect on the background.Consider either:
- Using a solid color fallback for smoother theme transitions
- Removing the
background-colorfrom the transition if gradient changes are acceptable- 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.translatedwould treat an empty string""as an error case. While unlikely in practice for translation results, if strict handling is desired, consider checking forundefinedexplicitly.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]);
|
@Maulik176 please resolve all the comments |
|
@sumitsaurabh927 All the issues reported by coderabbit are now resolved, Requesting you to please merge the PR. |
There was a problem hiding this 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.
|
@sumitsaurabh927 3 more issues by Coderabbit.. All the issues reported by coderabbit are now resolved, Requesting you to please merge the PR. |
There was a problem hiding this 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>
Maulik176
left a comment
There was a problem hiding this 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.
All reviews are resolved, this PR is ready to be merged. @sumitsaurabh927
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
@sumitsaurabh927 It has passed the full review. 👍
|
There was a problem hiding this 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 aligningeslint-config-nextversion withnext.
nextis pinned at16.0.7whileeslint-config-nextis at16.0.3. For consistency and to ensure lint rules match the runtime behavior, consider updatingeslint-config-nextto16.0.7as well.🔧 Suggested fix
- "eslint-config-next": "16.0.3", + "eslint-config-next": "16.0.7",
|
@sumitsaurabh927 Commit 9171c68 solves this issues. please merge |
There was a problem hiding this 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.
|
@sumitsaurabh927 It has passed the full review. again👍 |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this 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_LABELSrepeatsgetLocaleLabel, 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 inbuildFieldKey.
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"); } }
|
@sumitsaurabh927 Can you do some configuration where if you call coderabbit it lists down all issues at once. for now it is resolved. please merge |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
1 similar comment
✅ Actions performedFull review triggered. |
There was a problem hiding this 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]; }
There was a problem hiding this 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/mswordMIME type and.docextension as a workaround for Word compatibility. This works, but usingtext/htmlwith.htmlextension would be more accurate and portable across applications.
There was a problem hiding this 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).
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this 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: RedundantclassName="dark"when usingforcedTheme.Since
forcedTheme="dark"is set onThemeProvider,next-themeswill automatically add thedarkclass. The hardcodedclassName="dark"on<html>is redundant.♻️ Suggested cleanup
- <html lang="en" className="dark" suppressHydrationWarning> + <html lang="en" suppressHydrationWarning>
30-36: Remove the unusedModeTogglecomponent.The
ModeTogglecomponent atcomponents/mode-toggle.tsxis never imported or used anywhere in the codebase. Additionally, withforcedTheme="dark"andenableSystem={false}in theThemeProvider, 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
idattributes and associated<label>elements withhtmlFor, which impacts accessibility (screen readers and click-to-focus).Consider wrapping each input with a
<label>or addingaria-labelattributes:♿ 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
idand the label lackshtmlFor, 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 ..."
|
@coderabbitai full review |
|
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 performedFull review triggered. |
✅ Actions performedFull review triggered. |
@sumitsaurabh927 Requesting your merge approval
|





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
Localization
Documentation
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.