<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Diptom Saha on Medium]]></title>
        <description><![CDATA[Stories by Diptom Saha on Medium]]></description>
        <link>https://medium.com/@diptom?source=rss-f66d4e1979a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HLxuul8yRV15CmrbOaVTxg.jpeg</url>
            <title>Stories by Diptom Saha on Medium</title>
            <link>https://medium.com/@diptom?source=rss-f66d4e1979a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 07:30:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@diptom/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How We Automated Our GitLab PR Review Workflow with Claude Code]]></title>
            <link>https://javascript.plainenglish.io/how-we-automated-our-gitlab-pr-review-workflow-with-claude-code-17324d1306d5?source=rss-f66d4e1979a------2</link>
            <guid isPermaLink="false">https://medium.com/p/17324d1306d5</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Diptom Saha]]></dc:creator>
            <pubDate>Sat, 13 Jun 2026 15:07:42 GMT</pubDate>
            <atom:updated>2026-06-13T15:07:42.459Z</atom:updated>
            <content:encoded><![CDATA[<p>Every dev team knows this loop: you open a merge request, a reviewer leaves fifteen comments, you context switch back into a branch you finished three days ago, fix each comment one by one, write a commit, push, and then manually click &quot;resolve&quot; on every thread in GitLab.</p><p>It’s not hard work. It’s <em>tedious</em> work. And tedious work is exactly what an AI coding agent should be doing.</p><p>This article walks through the PR review workflow we built with <a href="https://code.claude.com/docs">Claude Code</a> for our production React application — a React 19 + TypeScript + MUI v7 portal with a GitLab-based review process. Everything lives in version control under it, so the entire team shares the same workflow for free.</p><h3>The Building Blocks</h3><p>Claude Code lets you extend it with three primitives, all of which are just Markdown files checked into your repo:</p><ul><li>Custom slash commands .claude/commands/*.md— reusable prompts with step-by-step instructions.</li><li>Subagents—specialized agents with their own system prompt and constraints, spawned in parallel for focused tasks</li><li>Project memory CLAUDE.md— your conventions, loaded into every session automatically</li></ul><p>There’s also a fourth primitive most teams discover later: Claude Code runs headless. `claude -p` takes a prompt on stdin and runs non-interactively—which means it can be a CI job, not just a terminal session. We use that to make Claude the first reviewer on every merge request.</p><p>Our PR workflow is built from four commands, one subagent, and one pipeline stage:</p><pre>.claude/<br>├── commands/<br>│   ├── get-pr-commits.md     # Inspect a PR: commits + diff       (Haiku)<br>│   ├── get-pr-comments.md    # List review threads by status      (Haiku)<br>│   ├── resolve-pr.md         # Fix comments, commit, resolve      (Sonnet)<br>│   └── commit.md             # Conventional commit from branch name<br>├── agents/<br>│   └── pr-comment-resolver.md  # One-file-at-a-time fix specialist<br>│<br>.gitlab-ci.yml                  # ai_review stage: Claude reviews every MR<br>scripts/ai-code-review.sh       # Headless review runner<br>.ai-review-patterns.md          # Review conventions + severity rules for CI</pre><h3>Step 1: Triage with Cheap Models—/get-pr-comments</h3><p>The first thing you want to know when you come back to a PR: what’s still open?</p><p>/get-pr-comments auto-detects the merge request from your current branch using the glab CLI, fetches every discussion thread through the GitLab API, and groups them:</p><pre>MR !8419: [HLUI-95] Add vulnerability export<br>Branch: HLUI-95 -&gt; pilot_new_portal<br><br>UNRESOLVED (3):<br>  #1 [src/pages/Licenses.tsx:42] @reviewer (2026-06-10):<br>     &gt; use useMemo here, this recalculates on every render<br><br>  #2 [src/hooks/useIndicators.ts:15] @reviewer:<br>     &gt; rename this variable, &quot;data2&quot; is not a name<br><br>  ...<br><br>Summary: 12 discussions — 3 unresolved, 8 resolved, 1 general</pre><p>The key detail is in the command’s frontmatter —</p><p>Reading and formatting API responses doesn’t need a frontier model. By pinning read-only commands to <strong>Haiku</strong>, triage costs roughly 80% less than running everything on the default model. The same trick powers /get-pr-commits, which shows the commit history and full diff against the merge base—useful for a self-review before you even ping a human reviewer.</p><p>Lesson 1: Match the model to the job. Read-and-report commands get Haiku. Code-modifying commands get Sonnet. The frontmatter makes this automatic, so nobody on the team has to think about it.</p><h3>Step 2: The Main Event — /resolve-pr</h3><p>This is the command that earns its keep. /resolve-pr takes every unresolved review thread and drives it to resolution. Here’s the pipeline it follows:</p><pre>detect API method (GitLab MCP server, or fall back to glab CLI)<br>        │<br>fetch unresolved discussions ──► filter to actionable DiffNotes<br>        │<br>categorize: CODE_CHANGE │ QUESTION │ STYLE_FIX │ TEST_REQUEST<br>        │<br>QUESTIONs ──► escalate to the human (reply / skip / convert to fix)<br>        │<br>group remaining by file ──► spawn parallel subagents (one per file)<br>        │<br>git diff review ──► human confirms ──► commit ──► human confirms ──► push<br>        │<br>resolve threads via API ──► verify ──► summary</pre><p>A few design decisions here are worth mentioning.</p><h3>Not every comment is a code change</h3><p>A naive implementation would try to “fix” every comment. But review threads come in flavors. “Use useMemo here” is a code change. “Why did you choose polling over websockets?” is a question—and an AI answering a question addressed to you on your own PR is how you lose your reviewer’s trust.</p><p>So the command categorizes first. Questions get surfaced to the human with full thread context and three options: write a reply, skip it, or convert it into a code change. Only genuine code requests proceed automatically.</p><h3>Parallel subagents, partitioned by file</h3><p>For the actual fixes, the command groups discussions by file and spawns one pr-comment-resolver subagent per file, all running in parallel. The partitioning rule matters: two agents editing the same file will conflict; two agents editing different files won’t. File-level grouping gives you maximum parallelism with zero merge conflicts.</p><p>Each subagent gets a tightly scoped prompt:</p><pre>File: src/hooks/useIndicators.ts<br><br>Discussion 1 (ID: a3f9c...):<br>  Line: 15<br>  Reviewer (@john): rename this variable, &quot;data2&quot; is not a name<br>  Category: STYLE_FIX<br><br>Instructions:<br>1. Read the file at the specified path<br>2. Implement the requested change(s) while preserving functionality<br>3. Follow project conventions (path aliases, theme tokens, ...)<br>4. Report back: what changed, lines affected, assumptions made</pre><p>And the subagent’s own definition (.claude/agents/pr-comment-resolver.md) bakes in hard constraints:</p><pre>- ONLY modify files explicitly assigned to you<br>- Do NOT create new files unless the comment specifically requests it<br>- Make minimal, focused changes that address the review comment<br>- If a comment is ambiguous, implement the most reasonable interpretation and note your assumption</pre><p>That last line is important. Ambiguity is inevitable in review comments; the answer isn’t to halt, it’s to act conservatively and surface the assumption so the human can veto it during diff review.</p><p>Lesson 2: subagents are about constraints, not just parallelism. The narrow system prompt is what keeps a <em>rename this variable</em> request from turning into an unwanted refactor of the whole file.</p><h3>Humans hold the commit and the push</h3><p>The command’s instructions are explicit:</p><pre>Do NOT auto-commit or auto-push. Always get explicit user confirmation for both operations.</pre><p>After the subagents finish, you see the full git diff and a per-file summary. You confirm the commit. You confirm the push. Only then does the command resolve the threads via the GitLab API—and only the threads where a change was actually implemented. Skipped questions and failed fixes stay open.</p><p>Lesson 3: Automate the loop, gate the side effects. Fetching, categorizing, editing, formatting — fully automatic. Anything that leaves your machine (commits, pushes, or thread resolution) gets a human checkpoint.</p><h3>Graceful degradation between MCP and CLI</h3><p>One subtle bit: the command doesn’t hardcode how to talk to GitLab. Step 0 checks whether a GitLab MCP server is connected; if so, it uses MCP tools for all API calls. If not, it falls back to the <em>glab CLI</em>. Team members with different setups run the exact same command.</p><p><strong>Step 3: Conventions as Code—CLAUDE.md Does the Heavy Lifting</strong></p><p>None of this works without project memory. Our CLAUDE.md encodes the conventions a human reviewer would otherwise enforce by hand:</p><pre>- Path aliases for all imports (@hooks/*, @organisms/*...) — never relative imports across folders<br>- Theme tokens only — never hex colors, never grey[100]<br>- moment.js is banned; date helpers live in one util file etc..</pre><p>Because subagents inherit this context, a fix for “extract this into a hook” lands already following the project’s structure. Without it, you’d spend the review cycle you just saved re-reviewing the AI’s style.</p><p>Lesson 4: The quality of automated fixes is capped by the quality of your written conventions. If a rule only exists in reviewers’ heads, the agent will violate it.</p><h3>Step 4: Claude as a Pipeline Stage—ai_review in GitLab CI</h3><p>Everything so far runs on a developer’s machine. But the biggest review bottleneck isn’t fixing comments — it’s waiting for the first review to happen. So we added Claude as a stage in the GitLab CI pipeline itself:</p><pre>stages:<br>  - security_scan<br>  - test<br>  - validate<br>  - ai_review      # ◄ Claude reviews the MR before build/deploy<br>  - build<br>  - docker_build<br>  - deploy</pre><p>The ai_review job triggers on every merge request targeting our <strong>master</strong> branch (drafts excluded), spins up a clean Debian container, installs the Claude Code CLI, and runs an agentic review headlessly:</p><pre>ai_review:<br>  stage: ai_review<br>  resource_group: ai-review-mr-$CI_MERGE_REQUEST_IID<br>  needs: []              # starts immediately, doesn&#39;t wait for tests<br>  allow_failure: true    # never blocks the pipeline<br>  timeout: 15 minutes<br>  rules:<br>    - if: &#39;$CI_PIPELINE_SOURCE == &quot;merge_request_event&quot;<br>           &amp;&amp; $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == &quot;integration&quot;<br>           &amp;&amp; $CI_MERGE_REQUEST_TITLE !~ /Draft/&#39;<br>  script:<br>    - bash scripts/ai-code-review.sh</pre><p>The heart of it is one CLI call inside ai-code-review.sh:</p><pre>REVIEW=$(echo &quot;$REVIEW_PROMPT&quot; | claude -p - \<br>  --allowedTools &quot;Read,Grep,Glob&quot; \<br>  --output-format text)</pre><p>Note the —allowedTools &quot;Read, Grep, Glob&quot; flag. This makes it an agentic review, not a diff-in-text-out transform. Claude reads the actual files, understands the codebase context, and evaluates the diff against the real project structure.</p><h3>The unglamorous parts are what make it usable</h3><p>One comment per MR. We post a single structured comment rather than line-by-line annotations. This avoids comment spam and keeps the signal-to-noise ratio high.</p><p>No concurrent reviews. The resource_group: <strong>ai-review-mr-$CI_MERGE_REQUEST_IID</strong> key ensures only one review runs per MR at a time.</p><p>Never block the merge. <strong>allow_failure: true</strong> means a Claude error never gates a deploy.</p><p>Bounded everything. 15-minute timeout, read-only tools, no network calls from within the review. Claude can’t do anything it shouldn’t.</p><p>Structured output. — The output-format text gives us a clean string we can post directly to the MR without parsing JSON or handling streaming.</p><h3>A separate conventions file for CI</h3><p>The CI job reads from .ai-review-patterns.md—a separate file that lives in the repo root alongside CLAUDE.md. It defines severity tiers and project-specific patterns for the pipeline review:</p><pre>## Severity levels<br>- BLOCKER: security issues, data loss risk, broken auth<br>- WARNING: performance, missing error handling, convention violations  <br>- INFO: style suggestions, minor improvements<br><br>## Never flag<br>- console.log in non-production code<br>- TODO comments<br>- Test file naming conventions</pre><p>Lesson 5: in CI, give the agent eyes but not hands. Read-only tools, bounded output, update-don’t-spam, and never block the pipeline. The local workflow is where the agent edits; the pipeline is where it observes and reports.</p><h3>The two halves meet</h3><p>Here’s the part we didn’t plan but turned out to be the payoff: the pipeline reviewer and the local /resolve-pr command close a loop with each other. The CI stage posts review findings minutes after you open the MR—before any human has looked at it. You read them, and for the legitimate ones, the comment thread is exactly the input <strong>/resolve-pr</strong> consumes. The MR often arrives at its human reviewer with the mechanical issues already found and already fixed.</p><h3>Closing the Loop—/commit and /review</h3><p>Two small commands round out the workflow:</p><p>/commit extracts the ticket number from the branch name (HLUI-95-feature → HLUI-95) and writes a one-line conventional commit: [HLUI-95] short clear description. No emoji, no boilerplate, consistent across the whole team.</p><p>/review &lt;path&gt; runs a structured pre-review against a checklist — React 19 patterns, TypeScript strictness, MUI theme usage, accessibility, i18n — so you catch the obvious stuff before a human reviewer spends time on it.</p><p>The full lifecycle ends up looking like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZGnQ1km-erf0nXvgM74bLg.png" /></figure><h3>What This Actually Changed</h3><p>The honest version: this doesn’t replace code review, and it shouldn’t. Reviewers still catch design problems, and questions still get human answers. What it eliminates is the mechanical end of the review cycle: the first pass (convention violations, obvious bugs—now posted by CI minutes after the MR opens) and the last mile (the re-reading, the one-comment-at-a-time fixing, the thread-clicking—now a single /resolve-pr). A batch of ten straightforward review comments goes from an afternoon of context-switching to a few minutes of reviewing a diff, and human reviewers start from an MR where the mechanical issues are already handled.</p><p>The meta-lesson is that the value wasn’t in “AI writes code.” It was in encoding a team workflow as version-controlled prompts: categorization rules, parallelization strategy, safety gates, severity calibration, and conventions all live in .claude, .gitlab-ci.yml, and .ai-review-patterns.md—next to the code they govern. New team members get the entire workflow on git clone. When the workflow has a bug — say, it resolves a thread it shouldn’t have, or the CI reviewer nitpicks too much — you fix the Markdown file and open a PR for it, like any other code.</p><p>Your review process probably differs from ours. That’s fine — that’s the point. The primitives (commands, subagents, memory) are generic; the workflow is yours to encode.</p><p>Our stack: React 19, TypeScript, Vite, MUI v7, GitLab CI, Claude Code (interactive with the glab CLI locally and headless via claude-p in the pipeline). All workflow files described here live in .claude/, scripts/, and .gitlab-ci.yml in the repository.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17324d1306d5" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/how-we-automated-our-gitlab-pr-review-workflow-with-claude-code-17324d1306d5">How We Automated Our GitLab PR Review Workflow with Claude Code</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Migrate a Monolithic React App to a Turborepo Monorepo — and Make it Rollback-Friendly]]></title>
            <link>https://javascript.plainenglish.io/how-to-migrate-a-monolithic-react-app-to-a-turborepo-monorepo-and-make-it-rollback-friendly-90acd00d5d14?source=rss-f66d4e1979a------2</link>
            <guid isPermaLink="false">https://medium.com/p/90acd00d5d14</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[micro-frontends]]></category>
            <dc:creator><![CDATA[Diptom Saha]]></dc:creator>
            <pubDate>Sat, 07 Feb 2026 03:50:48 GMT</pubDate>
            <atom:updated>2026-02-09T17:55:29.079Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How to Migrate a Monolithic React App to a Turborepo Monorepo — and Make it Rollback-Friendly</strong></h3><p>Deep dive into restructuring a large enterprise React application into independently versioned, lazy-loaded frontends using Turborepo.</p><p>We had a large, monolithic React frontend — powering table and graph visualisation, application analysis, and multi-authorised workspace management. Over time, the codebase grew to <strong>include 40+ feature modules</strong>, <strong>multiple</strong> <strong>Redux reducers</strong>, and a complex web of Redux-thunk side effects.</p><p>Then came a new requirement: build another <strong>application</strong> alongside the existing app. Both needed to share authentication, routing, and utilities — but evolve independently. We needed a better architecture.</p><h4>Shipping them as a single bundle meant:</h4><blockquote>- A bug in application 2 could block an application 1 release</blockquote><blockquote>- No way to roll back one app without reverting the other</blockquote><blockquote>- Growing build times as the bundle ballooned</blockquote><h4><strong>The Solution: A Three-Layer Turborepo Monorepo</strong></h4><pre>main-app<br>├── apps/<br>│   └── shell/                    # Layer 1: Orchestrator<br>├── packages/<br>│   ├── application-1/            # Layer 2: application - 1<br>│   ├── application-2/            # Layer 3: application - 2<br>│   └── common/                   # Layer 5: Shared utilities, design system<br>├── turbo.json<br>└── package.json</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fl_yJ9-pNFTHiD7lMcoOTA.png" /></figure><h4><strong>Layer 1: The Shell (Orchestrator)</strong></h4><p>The shell is the entry point. It does one thing well: <strong>route between apps. </strong>This<strong> </strong>decouples the loading decision from apps, avoids rebuilding everything on every change, and provides a single place for future cross-cutting concerns.</p><pre>function ShellApp() {<br>  return (<br>    &lt;Router&gt;<br>      &lt;Suspense fallback={&lt;LoadingFallback /&gt;}&gt;<br>        &lt;Switch&gt;<br>          &lt;Route path=&quot;/application-1&quot;&gt;<br>            &lt;ImagingApp /&gt;<br>          &lt;/Route&gt;<br>          &lt;Route path=&quot;/application-2&quot;&gt;<br>            &lt;ConsoleApp /&gt;<br>          &lt;/Route&gt;<br>        &lt;/Switch&gt;<br>      &lt;/Suspense&gt;<br>    &lt;/Router&gt;<br>  );<br>}</pre><p>Key points:</p><ul><li><strong>React.lazy() </strong>for code splitting — Application 1 and Application 2 load as separate chunks</li><li><strong>Suspense</strong> with a loading fallback — no blank screens during chunk loads</li><li><strong>React Router v5</strong> with &lt;Switch&gt; — clean URL-based routing between apps</li><li>The shell has zero business logic. It’s a traffic handler.</li></ul><h4><strong>Layer 2: Independent Applications (Application-1, Application-2)</strong></h4><p>Each app is a self-contained package that exports a single React component. This can be heavy on business logic. This helps independent builds, dependency trees, and release cycles so a failing Console test never blocks an Imaging release.</p><pre>// packages/application-1/src/index.js<br>export default function App1() {<br>  const [isReady, setIsReady] = useState(i18nInitialized);<br><br>  return (<br>    &lt;Provider store={store}&gt;<br>      &lt;Suspense fallback={&lt;LoadingComponent /&gt;}&gt;<br>        &lt;StyledEngineProvider injectFirst={true}&gt;<br>          &lt;ErrorBoundary header={true} retry={true} relogin={true}&gt;<br>            &lt;Route path=&quot;/application-1&quot;&gt;<br>              &lt;App /&gt;<br>            &lt;/Route&gt;<br>          &lt;/ErrorBoundary&gt;<br>        &lt;/StyledEngineProvider&gt;<br>      &lt;/Suspense&gt;<br>    &lt;/Provider&gt;<br>  );<br>}</pre><p>Each package owns its:</p><ul><li>Webpack configuration</li><li>Dependencies</li><li>Tests</li><li>Build output</li><li>Version number</li><li>Sub routes of each child&#39;s app</li></ul><h4><strong>Layer 3: Shared Code</strong></h4><p>The <strong>@main-app-fe/common</strong> package holds utilities used by multiple apps. This help avoids code duplication and cross-package coupling, enforces a clean one-way dependency direction.</p><pre>// packages/common/src/index.js<br>export { default as useDebounce } from &#39;./utilities/useDebounce&#39;;<br>export { useScroll } from &#39;./utilities/useScroll&#39;;<br>export { useForm } from &#39;./utilities/useForm&#39;;<br>export { default as useIntersectionObserver } from &#39;./utilities/useIntersectionObserver&#39;;<br>export { default as i18n } from &#39;./i18n&#39;;<br>export {default as FormComponent} from &#39;./common-ui/Form&#39;;</pre><p>Common uses <strong>peerDependencies</strong> for React and i18next to avoid duplicate bundles.</p><pre>{<br>  &quot;name&quot;: &quot;@main-app-fe/common&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;description&quot;: &quot;Common utilities and component for Webapp&quot;,<br>  &quot;main&quot;: &quot;src/index.js&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;lint&quot;: &quot;eslint ./src/ -f stylish&quot;,<br>    &quot;lint:fix&quot;: &quot;eslint --quiet ./src/ -f stylish --fix&quot;<br>  },<br>  &quot;peerDependencies&quot;: {<br>    &quot;react&quot;: &quot;^18.3.1&quot;,<br>    &quot;i18next&quot;: &quot;^23.14.0&quot;<br>  }<br>}</pre><h4><strong>Workspace Wiring</strong></h4><p>The root <strong>package.json</strong> declares npm workspaces</p><pre>{<br>  &quot;name&quot;: &quot;main-app-fe-monorepo&quot;,<br>  &quot;workspaces&quot;: [&quot;apps/*&quot;, &quot;packages/*&quot;]<br>}</pre><p>The shell declares workspace dependencies. The ”*” means “use whatever is in the local workspace.” npm resolves these to symlinks, not registry lookups.</p><pre>{<br>  &quot;dependencies&quot;: {<br>    &quot;@main-app-fe/application-1&quot;: &quot;*&quot;,<br>    &quot;@main-app-fe/application-2&quot;: &quot;*&quot;<br>  }<br>}</pre><h4><strong>Turborepo: Build Orchestration</strong></h4><p><strong>turbo.json</strong> defines the task dependency graph:</p><pre>{<br>  &quot;$schema&quot;: &quot;https://turbo.build/schema.json&quot;,<br>  &quot;tasks&quot;: {<br>    &quot;build&quot;: {<br>      &quot;dependsOn&quot;: [&quot;^build&quot;],<br>      &quot;outputs&quot;: [&quot;dist/**&quot;, &quot;build/**&quot;]<br>    },<br>    &quot;dev&quot;: {<br>      &quot;persistent&quot;: true,<br>      &quot;cache&quot;: false<br>    },<br>    &quot;test&quot;: {<br>      &quot;dependsOn&quot;: [&quot;^build&quot;],<br>      &quot;outputs&quot;: [&quot;coverage/**&quot;]<br>    },<br>    &quot;lint&quot;: {}<br>  }<br>}</pre><p>The <strong>dependsOn: [^build]</strong> is the key line. The `^` prefix means <strong>build my dependencies first</strong>. So when you run `turbo run build`:</p><p>1. <strong>@main-app-fe/common</strong> builds first (no dependencies)</p><p>2. <strong>@main-app-fe/application-1</strong> and <strong>@main-app-fe/application-2</strong> build in <strong>parallel</strong> (both depend on common)</p><p>3. <strong>shell</strong> builds last (depends on <strong>application-1</strong> and <strong>application-2</strong>)</p><p>Turbo handles caching, parallelisation, and dependency ordering automatically.</p><h4><strong>Development Server Architecture</strong></h4><p>Each package has its own webpack dev server, but the <strong>shell acts as the gateway</strong> in development</p><pre>Browser → Shell (port 3000)<br>              ├── /application-1/* → application-1 chunks (lazy-loaded)<br>              ├── /application-2/* → application-1 chunks (lazy-loaded)<br>              ├── /api/*     → Backend proxy (port 8090)</pre><p>The shell’s webpack config handles proxy routing for both applications’ backends.</p><pre>// apps/shell/config/webpack.deploy.js<br>devServer: {<br>  port: 3000,<br>  proxy: {<br>    &#39;/api/&#39;: { target: process.env.APPLICATION_BACKEND_URL },<br>    &#39;/app-1/api/&#39;: { target: process.env.APPLICATION_1_BACKEND_URL },<br>    &#39;/app-2/api/&#39;: { target: process.env.APPLICATION_2_BACKEND_URL },<br>  },<br>  static: [<br>    { directory: &#39;../packages/application-1/src/assets&#39;, publicPath: &#39;/application-1/assets&#39; },<br>    { directory: &#39;../packages/application-1/build/locales&#39;, publicPath: &#39;/application-1/locales&#39; },<br>  ]<br>}</pre><p>We have also added that selective development is possible via Turbo filters.</p><pre>npm run dev:shell     # Full stack with shell orchestrating<br>npm run dev:imaging   # Imaging standalone on port 3002<br>npm run dev:console   # Console standalone on port 3001</pre><h4><strong>Independent Versioning and Rollback</strong></h4><p>This is where the architecture pays off. Each package has its own version. We use <strong>package-prefixed git tags</strong> for release tracking.</p><pre>// packages/imaging/package.json<br>{ &quot;name&quot;: &quot;@imaging-fe/imaging&quot;, &quot;version&quot;: &quot;3.6.0&quot; }<br><br>// packages/console/package.json<br>{ &quot;name&quot;: &quot;@imaging-fe/console&quot;, &quot;version&quot;: &quot;1.0.0&quot; }<br><br>tag_package() {<br>    local package=$1<br>    local version=$2<br>    local tag=&quot;${package}-v${version}&quot;<br><br>    git tag -a &quot;${tag}&quot; -m &quot;Release ${package} v${version}&quot;<br>    git push origin &quot;${tag}&quot;<br>}<br><br># Release independently<br>./release.sh imaging    # Creates tag: imaging-v3.6.0<br>./release.sh console    # Creates tag: console-v1.0.0</pre><p><strong>Rolling back</strong> application 1 is a single command. Application 2 remains completely untouched. No collateral damage</p><pre># List available versions<br>git tag | grep imaging-v<br># imaging-v3.4.0<br># imaging-v3.5.0<br># imaging-v3.6.0<br><br># Revert imaging to a known-good version<br>git checkout imaging-v3.5.0 -- packages/imaging/<br>git add packages/imaging/<br>git commit -m &quot;Revert imaging to v3.5.0&quot;</pre><h4><strong>Cross-App Navigation</strong></h4><p>Users move between apps seamlessly — no page reloads</p><pre>// In Console — link to Imaging<br>&lt;Link to=&quot;/application-1/home/default/MyApp/overview&quot;&gt;<br>  Open in Imaging<br>&lt;/Link&gt;<br><br>// In Imaging — link to Console<br>&lt;Link to=&quot;/application-2/dashboard&quot;&gt;<br>  Back to Console<br>&lt;/Link&gt;</pre><p>React Router in the shell detects the path change and swaps the active app via lazy loading. The user experiences a single-page application.</p><h4>In Short —</h4><ol><li><strong>Keep the shell dumb: </strong>The shell should have zero business logic. No Redux, no API calls, no state. It routes and loads chunks. That’s it.</li><li><strong>Common packages need peer dependencies: </strong>If a <strong>common</strong> bundles its own React, you get two React instances at runtime. Use <strong>peerDependencies</strong> for shared libraries.</li><li><strong>Workspace `”*”` is a feature, not a bug: </strong>In a monorepo, <strong><em>”*”</em></strong> means “use the local version.” This is intentional — you always want the local workspace package, not a published one. Version numbers in package.json are metadata for tagging, not for dependency resolution.</li><li><strong>Git tags beat npm versions for rollback: </strong>In a monorepo, you can’t `npm install <strong>@main-app-fe/application-1@3.5.0</strong> — it’s not published. Package-prefixed git tags (`application-1-v3.5.0`) give you the same rollback capability with zero infrastructure.</li><li><strong>Turbo’s `^` operator is essential: dependsOn: [^build]</strong> ensures packages build in dependency order. Without it, the shell might try to import imaging before it’s built.</li><li><strong>Separate proxy configs per app: </strong>Each app talks to different backends. The shell’s webpack dev server needs separate proxy blocks for `/api/` vs `/application-2/api/`. Environment variables per backend keep configs clean.</li><li>P<strong>ackage structure is a stepping stone to true micro-frontends: </strong>Because each package is self-contained — with its own routes, state management, dependencies, and build config — extracting one into a separate repository is straightforward.</li></ol><h4>You can explore some of my other articles here:</h4><ol><li><a href="https://medium.com/javascript-in-plain-english/stop-the-drain-a-practical-guide-to-fixing-memory-leaks-in-frontend-apps-with-chrome-devtools-aeca19a3bdbb">A Practical Guide to Fixing Memory Leaks in Frontend Apps with Chrome DevTools</a></li><li><a href="https://medium.com/javascript-in-plain-english/nielsen-mts3-ui-interview-experience-e8de5d906bd8">Nielsen MTS3 UI Interview Experience</a></li><li><a href="https://medium.com/javascript-in-plain-english/cast-interview-experience-senior-software-engineer-fullstack-frontend-heavy-9bf3e116558e">CAST Interview Experience Senior Software Engineer FullStack (Frontend heavy)</a></li><li><a href="https://medium.com/@diptom/platform9-senior-frontend-engineer-interview-experience-d15faa1566db">Platform9 Senior Frontend Engineer Interview Experience</a></li></ol><h3>💡 Need Personalised Guidance?</h3><p>If you’d like <strong>1:1 guidance, Resume reviews, or a mock interview</strong>, you can book a session with me via <a href="https://topmate.io/diptom_saha"><strong>Topmate</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90acd00d5d14" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/how-to-migrate-a-monolithic-react-app-to-a-turborepo-monorepo-and-make-it-rollback-friendly-90acd00d5d14">How to Migrate a Monolithic React App to a Turborepo Monorepo — and Make it Rollback-Friendly</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Platform9 Senior Frontend Engineer Interview Experience]]></title>
            <link>https://blog.prototypr.io/platform9-senior-frontend-engineer-interview-experience-d15faa1566db?source=rss-f66d4e1979a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d15faa1566db</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Diptom Saha]]></dc:creator>
            <pubDate>Sun, 04 Jan 2026 17:45:53 GMT</pubDate>
            <atom:updated>2026-01-05T07:58:49.439Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*be8DE-5zgbTTNtoMd9RKTQ.png" /></figure><p>Recently, I interviewed for a <strong>senior frontend role</strong> and went through a <strong>screening round followed by two technical rounds</strong>. All rounds were conducted on <strong>CoderPad (</strong><a href="https://coderpad.io/"><strong>https://coderpad.io/</strong></a><strong>)</strong> and were heavily focused on <strong>practical JavaScript and React skills</strong>, rather than theoretical discussions.</p><p>Below is a detailed breakdown of the entire interview process.</p><h4>Screening Round—JavaScript &amp; React Basics (CoderPad)</h4><p>The screening round focused on <strong>fundamentals and problem-solving speed</strong>.</p><p>1.<strong> Todo List Assignment (React)</strong><br>I was asked to implement a <strong>basic to-do list</strong> with common features such as</p><ul><li>Adding todos</li><li>Rendering the list</li><li>Handling state updates</li><li>Clean component structure</li></ul><p>This was evaluated:</p><ul><li>React fundamentals</li><li>State management</li><li>Event handling</li><li>Code clarity</li></ul><p><strong>2️.</strong> <strong>JavaScript Output-Based Questions</strong><br>A few <strong>JS output-based questions</strong> were asked to test understanding of:</p><ul><li>Closures</li><li>Scope</li><li>Hoisting</li><li>Event loop behaviour</li></ul><p>This round ensured a solid grasp of <strong>core JavaScript concepts</strong> before moving on to more advanced technical discussions.</p><h4>I. Round 1—React Machine Coding (1 Hour)</h4><p>The first technical round consisted of a <strong>hands-on React coding exercise</strong> focused on API integration and dynamic UI behaviour.</p><h4>Question</h4><p>Build a <strong>React component</strong> that:</p><ul><li>Fetches Pokémon data from a <strong>public Pokémon API</strong></li><li>Displays the Pokémon in a <strong>table format</strong></li></ul><h3>🔄 Follow-up Requirement</h3><p>Enhance the UI so that the <strong>Pokémon colour changes basedon its type</strong>, for example:</p><ul><li>Fire → Red</li><li>Water → Blue</li><li>Grass → Green</li></ul><h3>🔍 What This Round Tested</h3><ul><li>API fetching and async handling</li><li>React state and lifecycle management</li><li>Conditional rendering and styling</li><li>Ability to adapt to evolving requirements</li></ul><h4>II. Round 2—File Tree UI in React (1 Hour)</h4><p>The second technical round focused on <strong>data modelling, recursion, and UI architecture</strong>.</p><p>I was given an <strong>array of file objects</strong>, where each object contained:</p><ul><li>path: full file path (e.g., app/src/App.tsx)</li><li>contents: file contents as a string</li></ul><h3>Requirements</h3><p>Using this input, I had to build a <strong>File Tree UI in React</strong> that:</p><ul><li>Displays files in a <strong>nested folder structure</strong></li><li>Supports <strong>arbitrarily deep folder hierarchies</strong></li></ul><p>Sorts items using the following rules:</p><ol><li><strong>Folders appear before files</strong></li><li>All entries are sorted <strong>alphabetically (case-insensitive)</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*babt1ga9VTir-vn3SEqSuQ.png" /></figure><h3>🛠️ Solution Approach</h3><p>The solution involved <strong>two main steps</strong>:</p><ol><li><strong>Transforming the flat file list into an object-based structure</strong></li><li><strong>Rendering the tree recursively in React using that object-based structure.</strong></li></ol><p>This problem can be solved using two methods.</p><ol><li>Using a recursion-based solution to extract the object from that input</li><li>Or you can use a pointer-based solution to extract the object from that input</li></ol><p>Then, using that object, we can render the React file system. You can explore the solution in <a href="https://codesandbox.io/p/sandbox/platforms-9-interview-question-9q5t7h">CodeSandbox</a>.</p><h4>Outcome</h4><p>While the overall interview experience was insightful and technically engaging, I was <strong>unable to complete Round 2 within the given time</strong>.</p><p>As a result, I received <strong>negative feedback from Round 2</strong>, and the process did not move forward beyond that stage.</p><p>Hope this helps anyone preparing for <strong>senior software engineer interviews</strong>. Happy coding! 💻✨</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MYL8tsxwGacPcNde-yxuwQ.png" /></figure><p>You can explore some of my other articles here:</p><ol><li><a href="https://medium.com/javascript-in-plain-english/stop-the-drain-a-practical-guide-to-fixing-memory-leaks-in-frontend-apps-with-chrome-devtools-aeca19a3bdbb">A Practical Guide to Fixing Memory Leaks in Frontend Apps with Chrome DevTools</a></li><li><a href="https://medium.com/javascript-in-plain-english/nielsen-mts3-ui-interview-experience-e8de5d906bd8">Nielsen MTS3 UI Interview Experience</a></li><li><a href="https://medium.com/javascript-in-plain-english/cast-interview-experience-senior-software-engineer-fullstack-frontend-heavy-9bf3e116558e">CAST Interview Experience Senior Software Engineer FullStack (Frontend heavy)</a></li></ol><h4>💡 Need Personalised Guidance?</h4><p>If you’d like <strong>1:1 guidance, Resume reviews, or a mock interview</strong>, you can book a session with me via <a href="https://topmate.io/diptom_saha"><strong>Topmate</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d15faa1566db" width="1" height="1" alt=""><hr><p><a href="https://blog.prototypr.io/platform9-senior-frontend-engineer-interview-experience-d15faa1566db">Platform9 Senior Frontend Engineer Interview Experience</a> was originally published in <a href="https://blog.prototypr.io/">Prototypr</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Practical Guide to Fixing Memory Leaks in Frontend Apps with Chrome DevTools.]]></title>
            <link>https://javascript.plainenglish.io/stop-the-drain-a-practical-guide-to-fixing-memory-leaks-in-frontend-apps-with-chrome-devtools-aeca19a3bdbb?source=rss-f66d4e1979a------2</link>
            <guid isPermaLink="false">https://medium.com/p/aeca19a3bdbb</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[chrome-dev-tools]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Diptom Saha]]></dc:creator>
            <pubDate>Sun, 28 Dec 2025 11:29:00 GMT</pubDate>
            <atom:updated>2026-01-05T07:59:17.899Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BfbQ0zK-AhvGiEn1oymE_A.png" /></figure><p>Frontend application memory leaks are subtle, harmful, and frequently disregarded until users begin to complain about poor performance, frozen tabs, or browser crashes. Understanding how to find and address memory leaks becomes crucial for frontend engineers as web programs get more complicated.</p><p>Using actual JavaScript samples and a thorough explanation of every option found in the <strong>Memory tab</strong>, we’ll walk through a useful, hands-on method for <strong>troubleshooting memory leaks using Chrome DevTools</strong> in this article.</p><h4>What Is a Memory Leak in JavaScript?</h4><p>JavaScript has automatic garbage collection, which means the engine automatically frees <strong>heap-allocated memory, such as objects, arrays, functions, closures, and dynamically created strings,</strong> once they become unreachable. However, memory leaks can occur when references to these values are unintentionally retained.</p><h4>What the Garbage Collector Collects</h4><ul><li><strong>Objects</strong> {}, including nested objects</li><li><strong>Arrays</strong></li><li><strong>Functions</strong></li><li><strong>Closures</strong></li><li><strong>Dynamically created strings</strong> (e.g. via concatenation or runtime operations)</li><li><strong>DOM nodes</strong> (if no JS references exist)</li></ul><h4>What It Does NOT Collect</h4><ul><li><strong>Primitive literals on the stack</strong> (like numbers, booleans used in active execution)</li><li><strong>Global references</strong> (anything reachable from window)</li><li><strong>Objects still referenced by closures, event listeners, timers, or caches</strong></li></ul><p>Memory leaks happen <strong>not because GC fails</strong>, but because objects are <strong>still reachable</strong>, even when they are no longer useful.</p><h4>Common Frontend Causes</h4><blockquote><em>Global variables</em> - Objects attached to the global scope are never garbage collected until the page unloads</blockquote><p><strong>Why it leaks:</strong><br> Anything referenced from window stays alive for the lifetime of the page. If the array keeps growing, memory keeps increasing.</p><pre>// ❌ Leak: global variable<br>window.userCache = [];<br><br>function addUser(user) {<br>  window.userCache.push(user);<br>}</pre><blockquote><em>Unremoved event listeners - </em>Event listeners keep references to DOM nodes and closures even after the element is removed.</blockquote><p><strong>Why it leaks:</strong><br> The event listener retains a reference to the DOM element, preventing garbage collection.</p><pre>function attachListener() {<br>  const button = document.getElementById(&quot;btn&quot;);<br><br>  button.addEventListener(&quot;click&quot;, () =&gt; {<br>    console.log(&quot;clicked&quot;);<br>  });<br>}</pre><blockquote><em>Timers</em> (setInterval, setTimeout ) - Timers keep executing and holding references unless explicitly cleared</blockquote><p><strong>Why it leaks:</strong><br> The interval keeps running and allocating memory even when the component/page is gone.</p><pre>function startPolling() {<br>  setInterval(() =&gt; {<br>    const data = new Array(1e5);<br>    console.log(data.length);<br>  }, 1000);<br>}</pre><blockquote><em>Detached DOM nodes</em> DOM elements removed from the document but still referenced in JavaScript</blockquote><p><strong>Why it leaks:</strong><br> Even though the node is removed from the DOM, the JS reference keeps it alive.</p><pre>let element = document.getElementById(&quot;card&quot;);<br>document.body.removeChild(element);</pre><blockquote><em>Unbounded caches</em> Caches that grow indefinitely without eviction policies</blockquote><p><strong>Why it leaks:</strong><br> Objects are never removed, causing memory to grow continuously.</p><pre>const cache = {};<br><br>function storeData(key, value) {<br>  cache[key] = value;<br>}</pre><h4>Chrome DevTools: Memory Tab Overview</h4><p>This section demonstrates <strong>how each option in the Chrome DevTools Memory tab can be used to identify, analyse, and debug memory leaks</strong> in frontend applications.<br> For every option, we’ll walk through <strong>when to use it, what kind of memory issues it helps uncover, and a concrete JavaScript code example</strong> that reproduces the problem, making it easier to connect theory with real-world debugging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B2IQ8YkjO-oJO5OGPpJwiQ.png" /><figcaption>Devtool Memory Tab options</figcaption></figure><h4>1. Heap Snapshot (Most Important Tool)</h4><p>Heap snapshots capture the entire JavaScript heap at a moment in time and allow you to compare memory states. Let’s understand this with a simple example. You can create an index.html file in your local directory and paste the code below to check for memory leaks in your Chrome tab.</p><p>When to use this tool</p><ul><li>Memory grows after navigation or user actions</li><li>Suspected memory leaks</li><li>Investigating retained objects</li><li>Investigate Detached Elements</li></ul><pre>&lt;html&gt;<br>&lt;body&gt;<br>    Hello<br>&lt;/body&gt;<br>&lt;script&gt;<br><br> const leaked = [];<br> <br> function start() {<br>    setInterval(() =&gt; {<br>      const data = new Array(5000).fill(Math.random());<br>      leaked.push(data); <br>      console.log(data[0]);<br>      const elm = document.createElement(&#39;div&#39;)<br>      elm.innerText = data[0];<br>       document.body.appendChild(elm);<br>      document.body.removeChild(elm);<br>    }, 1000);<br>  }<br><br>  start()<br><br>&lt;/script&gt;<br>&lt;/html&gt;</pre><p>This code leaks memory because each interval execution creates a large array and stores it in a global variable leaked array, keeping all previously created arrays reachable from the window object and therefore preventing the garbage collector from reclaiming them, which causes retained memory to grow continuously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*caoM78CLcirVl008YLn7ZQ.png" /><figcaption>Heap snapshot comparison</figcaption></figure><p>Let’s break down the key options in the screenshot and how we can find possible memory leaks in our application:</p><p>1️⃣ <strong>Take a snapshot (Top-left circle icon)</strong></p><ul><li>What it does: Tells Chrome to take a snapshot. You take multiple snapshots at some interval</li><li>Why it matters: It helps identify objects that are truly retained. If memory persists after GC, these objects may be leaking.</li><li>You can also use a debugger in your local environment to check how memory is being allocated to a specific portion of the code.</li></ul><p>2️⃣ <strong>Snapshot Comparison Selector (Top-centre)</strong></p><ul><li>What it does: Allows you to compare two or more heap snapshots, e.g., “Snapshot 1 vs. Snapshot 2.</li><li>Why it matters: Reveals which objects were allocated between snapshots or user actions. Continuous growth in those objects indicates potential leaks.</li></ul><p>3️⃣ <strong>Retained Size (Top-right arrow)</strong></p><ul><li>What it does: Sorts objects by <strong>retained size.</strong></li><li>Shallow Size: Memory used by the object itself.</li><li>Retained Size: Memory that would be freed if this object and its references were garbage collected.</li><li>Why it matters: Objects with large retained size are prime suspects for memory leaks. In our case, it global leakedvariable. You can see in the multiple screenshots that the retained size for the array is increasing.</li></ul><p>4️⃣ <strong>Leaked Object Reference (Left-side arrow)</strong></p><ul><li>What it does: Shows the reference path, keeping an object in memory, e.g., in our case leaked array.</li><li>Why it matters: Helps trace which variable, closure, or structure is preventing GC. Following these references pinpoints the root cause of leaks.</li></ul><p>Now, let&#39;s see how to find Detached Elements from the Heap Snapshot. Let&#39;s use the code below for this usecase.</p><pre>&lt;html&gt;<br>&lt;body&gt;<br>    Hello<br>&lt;/body&gt;<br>&lt;script&gt;<br><br>    let cachedNode;<br><br>    function createAndRemove() {<br>        const div = document.createElement(&quot;div&quot;);<br>        div.textContent = &quot;Detached element&quot;;<br>        document.body.appendChild(div);<br><br>        // Remove from DOM<br>        document.body.removeChild(div);<br>        // ❌ Reference still exists<br>        cachedNode = div;<br>    }<br>    createAndRemove()<br>&lt;/script&gt;<br>&lt;/html&gt;</pre><p>Now lets refer to the below heap snapshot. You need to select <strong>Object retained by detached DOM nodes </strong>from the dropdown. It will show you all the detached nodes of any particular heap snapshot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yXKpTFJj6U6VQ42HN43tHw.png" /><figcaption>Heap snapshot for detached element</figcaption></figure><h4>2. Allocation Instrumentation on Timeline</h4><p>It records all <strong>JavaScript object allocations</strong> over time, showing them as <strong>blue bars</strong> on the Memory tab’s timeline to help you find and debug memory leaks by linking allocations to specific code. It takes periodic heap snapshots and displays <strong>new memory spikes</strong>, allowing you to select timeframes to see which objects were created and are still live, revealing retaining paths (call stacks) for those growing memory consumers.</p><p>When to use this</p><ul><li>Memory spikes during specific interactions</li><li>Suspected leaks from timers or repeated actions</li><li>Need real-time allocation tracking</li></ul><pre>&lt;html&gt;<br>&lt;body&gt;<br>    Hello<br>&lt;/body&gt;<br><br>&lt;script&gt;<br>    let newArray = []<br>    function startPolling() {<br>        setInterval(() =&gt; {<br>            const data = new Array(1e5).fill(&quot;poll&quot;);<br>            newArray.push(data)<br>            console.log(data.length);<br>        }, 1000);<br>    }<br><br>    startPolling()<br>&lt;/script&gt;<br>&lt;/html&gt;</pre><p>Let&#39;s check the memory allocation for the above-mentioned code and how, with time, memory has been allocated and retained over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KdyNw8f_7DC5zNkafQu4JA.png" /></figure><p>You can see in the arrow all the blue bars. That&#39;s when memory allocation happened. You can zoom and see exactly what and where these allocations happened. This can be very useful when you suspect some memory allocation for some specific user interaction.</p><h4>3. Allocation Sampling</h4><p>This is especially useful for performance optimisation rather than precise leak detection. This basically records memory allocations instead of tracking every single one, making it suitable for long-running sessions.</p><p>When to use this</p><ul><li>Large applications, Approximate allocation sizes</li><li>Functions allocating the most memory</li><li>Identifying heavy allocation paths</li></ul><pre>&lt;html&gt;<br>&lt;body&gt;<br>    Hello<br>&lt;/body&gt;<br>&lt;script&gt;<br><br>function pollingCallback() {<br>    const data = new Array(1e5).fill(&quot;poll&quot;);<br>    newArray.push(data);<br>    console.log(data.length);<br>}<br>    let newArray = []<br>    function startPolling() {<br>        setInterval(pollingCallback,  1000);<br>    }<br>    startPolling()<br>&lt;/script&gt;<br>&lt;/html&gt;</pre><p>Let’s check the memory allocation for the above-mentioned code and how much memory has been allocated to our specific code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HxTtjT4pXsj6ANUHZur8ww.png" /></figure><p>You can check in the screenshot, the function name and the memory it is consuming. Multiple views are supported: Heavy(Bottom up), Tree, and chart. Based on your needs, you can use these options.</p><h3>In short</h3><ul><li>A growing heap size does not always indicate a memory leak; only objects that remain reachable after garbage collection contribute to retained memory.</li><li><strong>Heap Snapshot comparison</strong> is the most reliable way to identify real memory leaks by showing objects that persist between snapshots.</li><li><strong>Retained size</strong> is the most important metric when debugging leaks, as it represents the total memory blocked by an object and its dependents.</li><li><strong>Detached Elements</strong> reveal DOM nodes that are no longer in the document but are still held in memory due to lingering JavaScript references.</li><li>Global variables, closures, event listeners, and long-running timers are the most common sources of frontend memory leaks.</li><li>Not all memory problems are leaks high allocation rates can cause performance issues even when garbage collection works correctly.</li><li>Always inspect the <strong>Retainers panel</strong> to understand why an object is still alive; the retainer path tells the true story behind every leak.</li></ul><p>You can explore some of my other articles here:</p><ol><li><a href="https://medium.com/javascript-in-plain-english/cast-interview-experience-senior-software-engineer-fullstack-frontend-heavy-9bf3e116558e">CAST Interview Experience Senior Software Engineer FullStack (Frontend heavy)</a></li><li><a href="https://medium.com/javascript-in-plain-english/nielsen-mts3-ui-interview-experience-e8de5d906bd8">Nielsen MTS3 UI Interview Experience</a></li><li><a href="https://medium.com/@diptom/platform9-senior-frontend-engineer-interview-experience-d15faa1566db">Platform9 Senior Frontend Engineer Interview Experience</a></li></ol><h4>💡 Need Personalised Guidance?</h4><p>If you’d like <strong>1:1 guidance, Resume reviews, or a mock interview</strong>, you can book a session with me via <a href="https://topmate.io/diptom_saha"><strong>Topmate</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aeca19a3bdbb" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/stop-the-drain-a-practical-guide-to-fixing-memory-leaks-in-frontend-apps-with-chrome-devtools-aeca19a3bdbb">A Practical Guide to Fixing Memory Leaks in Frontend Apps with Chrome DevTools.</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CAST  Senior Software Engineer  (Frontend heavy) Interview Experience]]></title>
            <link>https://javascript.plainenglish.io/cast-interview-experience-senior-software-engineer-fullstack-frontend-heavy-9bf3e116558e?source=rss-f66d4e1979a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bf3e116558e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend-interviews]]></category>
            <category><![CDATA[javascript-interview]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-interview-question]]></category>
            <dc:creator><![CDATA[Diptom Saha]]></dc:creator>
            <pubDate>Fri, 26 Dec 2025 19:37:37 GMT</pubDate>
            <atom:updated>2026-01-05T08:01:16.589Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>CAST Senior Software Engineer (Frontend heavy) Interview Experience</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*huf6DwGLmWU-PrkGECykEg.png" /></figure><p>I interviewed with <strong>CAST</strong> for the <strong>Senior Software Engineer</strong> position. The interview process consisted of <strong>four rounds</strong>, each focusing on <strong>JavaScript fundamentals, React expertise, machine coding and system design.</strong></p><p>Overall, the experience was well-structured and depth-oriented, especially for a senior software engineer role.</p><h3><strong>I. Round 1 JavaScript &amp; React (1 Hour)</strong></h3><p>The first round was a <strong>deep dive into JavaScript internals and React concepts</strong>, along with a discussion around my past projects.</p><h4><strong>JavaScript Concepts (Deep Dive)</strong></h4><p>Topics covered included:</p><ul><li><strong>Execution Context</strong><br> Discussion around call stack, creation and execution phases, and how JavaScript handles memory and scope.</li><li><strong>Closures</strong><br> Explained closures with examples and discussed <strong>real-world use cases</strong>, such as data encapsulation and function factories.</li><li><strong>Promise.allSettled Polyfill</strong><br> Asked to explain and implement a polyfill, testing understanding of promises, async handling, and edge cases.</li><li><strong>Auto-Retry Promise</strong><br> Designed a utility to <strong>retry a promise N times</strong> with a <strong>cooling-off period (100 ms)</strong> between retries, focusing on error handling and retry logic.</li></ul><pre>function retryPromise(fn, maxRetries = 3, delay = 100) {<br>  return new Promise((resolve, reject) =&gt; {<br>    let attempts = 0;<br><br>    const attempt = () =&gt; {<br>      fn()<br>        .then(resolve)<br>        .catch(error =&gt; {<br>          attempts++;<br><br>          if (attempts &lt; maxRetries) {<br>            // retry immediately<br>            attempt();<br>          } else {<br>            // batch exhausted → wait → reset attempts → retry again<br>            attempts = 0;<br>            setTimeout(attempt, delay);<br>          }<br>        });<br>    };<br><br>    attempt();<br>  });<br>}<br><br><br>// Sample function <br><br>let count = 0;<br><br>const unstableCall = () =&gt;<br>  new Promise((resolve, reject) =&gt; {<br>    count++;<br>    console.log(`Attempt ${count}`);<br>    count &gt;= 10? resolve(&quot;Success 🎉&quot;) : reject(&quot;Failed&quot;);<br>  });<br><br>retryPromise(unstableCall, 3, 100)<br>  .then(result =&gt; console.log(result))<br>  .catch(err =&gt; console.error(err));<br><br><br>//Sample Output <br><br>Attempt 1<br>Attempt 2<br>Attempt 3 (wait 100 ms before next Attempt)<br>Attempt 4<br>Attempt 5<br>Attempt 6 (wait 100 ms before next Attempt)<br>Attempt 7<br>Attempt 8<br>Attempt 9 (wait 100 ms before next Attempt)<br>Attempt 10<br>Success 🎉</pre><h4>React Concepts</h4><ul><li><strong>React Memoization</strong></li><li>Difference between <strong>useMemo</strong> and <strong>useCallback</strong></li><li>Practical scenarios and performance use cases</li></ul><h4>Resume &amp; Project Discussion</h4><ul><li>Deep discussion around <strong>past projects</strong></li><li>Architectural decisions taken</li><li>Challenges faced and how they were solved</li></ul><h3><strong>II. Round 2 React Machine Coding (1 Hour)</strong></h3><p>This round focused on <strong>hands-on React coding</strong> and architectural understanding.</p><h4>Topics Covered</h4><ul><li><strong>Custom Hook </strong><strong>useDebounce</strong><br> Implemented a reusable debounce hook, discussing cleanup, dependency handling, and real-world usage.</li><li><strong>Higher-Order Components (HOC)</strong><br> Explained what HOCs are, along with practical examples and when to use them.</li><li><strong>Resume Drill &amp; Micro-Frontend Architecture</strong><br> In-depth discussion around:</li><li>Micro-frontend approach</li><li>Integration strategy</li><li>Pros and cons</li></ul><h3>III. Round 3 Hiring Manager (System Design) Round (1 Hour)</h3><p>The HM round focused on <strong>system design and large-scale frontend architecture</strong>.</p><h4>Key Discussion Areas</h4><blockquote><strong>Micro-Frontend (MFE) Architecture</strong></blockquote><p><strong>Routing in MFE and Host Application</strong></p><ul><li>How routing is managed between the host and micro apps</li><li>Independent vs shared routing strategies</li></ul><p><strong>Authentication &amp; Authorization</strong></p><ul><li>How auth is handled at the host level</li><li>Token sharing and security considerations for MFEs</li></ul><p><strong>Styling Strategy</strong></p><ul><li>How styling is managed in my current project</li><li>Avoiding CSS conflicts across MFEs</li></ul><p><strong>Release Process Across Multiple Data Centres</strong></p><ul><li>Deployment strategies</li><li>Versioning</li><li>Rollback mechanisms</li><li>Ensuring zero downtime</li></ul><h3><strong>IV. Round 4 Head of Engineering Round (30 Minutes)</strong></h3><p>The final round was more <strong>conversational and leadership-oriented</strong>.</p><h4>Discussion Topics</h4><ul><li>Role Expectations</li><li>Resume Walkthrough</li><li>Expectations from my next role</li><li>Team structure and engineering processes followed at CAST</li><li>Reason for the switch</li></ul><p>This round was focused on <strong>alignment, culture fit, and long-term expectations</strong> rather than technical depth.</p><h3>Outcome</h3><p>After successfully clearing all four rounds, <strong>I received positive feedback </strong>🎉.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rofOvkLPzezuGDAcjgZxcA.png" /></figure><p>Hope this helps anyone preparing for <strong>senior software engineer interviews</strong> at CAST or similar companies. Happy coding! 💻✨</p><p>You can explore some of my other articles here:</p><ol><li><a href="https://medium.com/javascript-in-plain-english/stop-the-drain-a-practical-guide-to-fixing-memory-leaks-in-frontend-apps-with-chrome-devtools-aeca19a3bdbb">A Practical Guide to Fixing Memory Leaks in Frontend Apps with Chrome DevTools</a></li><li><a href="https://medium.com/javascript-in-plain-english/nielsen-mts3-ui-interview-experience-e8de5d906bd8">Nielsen MTS3 UI Interview Experience</a></li><li><a href="https://medium.com/@diptom/platform9-senior-frontend-engineer-interview-experience-d15faa1566db">Platform9 Senior Frontend Engineer Interview Experience</a></li></ol><h4>💡 Need Personalised Guidance?</h4><p>If you’d like <strong>1:1 guidance, Resume reviews, or a mock interview</strong>, you can book a session with me via <a href="https://topmate.io/diptom_saha"><strong>Topmate</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bf3e116558e" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/cast-interview-experience-senior-software-engineer-fullstack-frontend-heavy-9bf3e116558e">CAST  Senior Software Engineer  (Frontend heavy) Interview Experience</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nielsen MTS3 UI Interview Experience]]></title>
            <link>https://javascript.plainenglish.io/nielsen-mts3-ui-interview-experience-e8de5d906bd8?source=rss-f66d4e1979a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8de5d906bd8</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[frontend-interviews]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Diptom Saha]]></dc:creator>
            <pubDate>Sat, 20 Dec 2025 10:07:33 GMT</pubDate>
            <atom:updated>2026-01-05T08:00:50.338Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*wiy59KOW-kRGmZ-9mgR3qQ.png" /></figure><p>Recently, I interviewed for the <strong>MTS3 (Member of Technical Staff — UI)</strong> position at <strong>Nielsen</strong>. The process consisted of <strong>three rounds</strong>, focusing on <strong>JavaScript fundamentals, React machine coding, data structures, system design, and discussions on real-world architecture</strong>.</p><p>Overall, the interview was well-structured and leaned heavily toward <strong>practical frontend engineering skills</strong>, rather than purely theoretical questions. Below is a detailed breakdown of each round and what you can expect.</p><p>🔹 <strong>Round 1 — Technical + Machine Coding</strong></p><p>The first round covered <strong>core JavaScript concepts</strong>, <strong>React problem-solving</strong>, and <strong>DSA fundamentals</strong>.</p><h3>1️⃣ Keyify a JavaScript Object</h3><p>I was asked to write a function that <strong>transforms an object into a specific keyed structure</strong>.<br> This tested:</p><ul><li>Object traversal</li><li>Handling nested objects</li><li>Understanding of immutability</li><li>Clean and readable JavaScript logic</li></ul><blockquote><em>Tip: Be comfortable with </em><em>Object.keys, </em><em>Object.entries, recursion, and edge cases.</em></blockquote><h3>2️⃣ Folder Structure Like VS Code (React — Machine Coding)</h3><p>This was a <strong>machine coding round</strong> where I had to implement a <strong>VS Code–like folder/file explorer</strong> in React.</p><p>Key expectations:</p><ul><li>Recursive rendering of folders/files</li><li>Expand/collapse functionality</li><li>State management</li><li>Clean component design</li></ul><p>Important concepts tested:</p><ul><li>Recursive React components</li><li>Conditional rendering</li><li>Component reusability</li><li>Performance awareness</li></ul><blockquote><em>This round clearly evaluates </em><strong><em>real-world React thinking</em></strong><em>, not just syntax.</em></blockquote><h3>3️⃣ LeetCode — Clone Graph (Medium)</h3><p>LeetCode Problem:<br> 👉 <a href="https://leetcode.com/problems/clone-graph/">https://leetcode.com/problems/clone-graph/</a></p><p>This question tested:</p><ul><li>Graph traversal (DFS / BFS)</li><li>Handling cyclic graphs</li><li>Deep copy concepts</li><li>HashMap usage for visited nodes</li></ul><blockquote><em>Strong understanding of </em><strong><em>graphs and recursion</em></strong><em> is essential for MTS-level roles.</em></blockquote><h3>🔹 Round 2 — EM (Engineering Manager) Round</h3><p>This round was more <strong>discussion-oriented, focusing on ownership, design thinking, and the experience</strong>.</p><h3>1️⃣ Resume &amp; Project Discussion</h3><p>The EM went deep into:</p><ul><li>My recent projects</li><li>My role and contributions</li><li>Challenges faced and how I solved them</li><li>Trade-offs and decision-making</li></ul><blockquote><em>Be prepared to explain </em><strong><em>why</em></strong><em> you chose a solution, not just </em><strong><em>what</em></strong><em> you built.</em></blockquote><h3>2️⃣ High-Level Design (HLD)</h3><p>I was asked to design a system at a <strong>high level</strong>, focusing on:</p><ul><li>Component interaction</li><li>Data flow</li><li>Scalability considerations</li><li>UI + backend communication</li></ul><p>This round checked:</p><ul><li>System thinking</li><li>Clarity of communication</li><li>Ability to break down complex systems</li></ul><h3>🔹 Round 3 — Director Round</h3><p>The final round was with a <strong>Director</strong>, and it focused on <strong>architecture, impact, and depth of experience</strong>.</p><h3>1️⃣ MFE (Micro-Frontend) Architecture of Current Project</h3><p>I explained the <strong>Micro-Frontend architecture</strong> used in my current project, covering:</p><ul><li>Why MFE was chosen</li><li>Frameworks used</li><li>Module federation integration strategy</li><li>Deployment and versioning challenges</li><li>Pros and cons of MFE</li></ul><blockquote><em>This round tested </em><strong><em>real-world architectural maturity</em></strong><em>.</em></blockquote><h3>2️⃣ Progress Bar with Dynamic Content in React</h3><p>I was asked to design and explain a <strong>progress bar component</strong> that:</p><ul><li>Updates dynamically based on content or API response</li><li>Handles loading states</li><li>Is reusable and configurable</li></ul><p>Key areas evaluated:</p><ul><li>React hooks usage</li><li>Component design</li><li>Handling async data</li><li>UI/UX considerations</li></ul><h3>Outcome</h3><p>After successfully clearing all three rounds, <strong>I received a positive result and cracked the Nielsen MTS3 UI interview</strong> 🎉.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SYQ1Gd9MUr2Yp3FGYsGqxg.png" /></figure><p>The process was <strong>challenging, practical, and very relevant to real-world frontend engineering</strong>, especially at a senior/MTS level.</p><p>You can explore some of my other articles here:</p><ol><li><a href="https://medium.com/javascript-in-plain-english/stop-the-drain-a-practical-guide-to-fixing-memory-leaks-in-frontend-apps-with-chrome-devtools-aeca19a3bdbb">A Practical Guide to Fixing Memory Leaks in Frontend Apps with Chrome DevTools</a></li><li><a href="https://medium.com/javascript-in-plain-english/cast-interview-experience-senior-software-engineer-fullstack-frontend-heavy-9bf3e116558e">CAST Interview Experience Senior Software Engineer FullStack (Frontend heavy)</a></li><li><a href="https://medium.com/@diptom/platform9-senior-frontend-engineer-interview-experience-d15faa1566db">Platform9 Senior Frontend Engineer Interview Experience</a></li></ol><h4>💡 Need Personalised Guidance?</h4><p>If you’d like <strong>1:1 guidance, Resume reviews, or a mock interview</strong>, you can book a session with me via <a href="https://topmate.io/diptom_saha"><strong>Topmate</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8de5d906bd8" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/nielsen-mts3-ui-interview-experience-e8de5d906bd8">Nielsen MTS3 UI Interview Experience</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>