V1.0.0 #8

Merged
irammini merged 38 commits from dev into main 2026-02-03 21:45:14 +00:00
irammini commented 2026-02-02 17:07:33 +00:00 (Migrated from github.com)
No description provided.
irossmini commented 2026-02-02 20:24:40 +00:00 (Migrated from github.com)

In this commit:

  • Added Pipeline class in src/pipeline.ts using Builder pattern.
  • Implemented step and stepIf for sequential workflow execution.
  • Added pipeline() static method to MepCLI in src/core.ts.
  • Exported Pipeline in src/index.ts.
  • Added example script examples/pipeline-demo.ts.
  • Fixed existing lint error in src/prompts/code.ts.
In this commit: - Added `Pipeline` class in `src/pipeline.ts` using Builder pattern. - Implemented `step` and `stepIf` for sequential workflow execution. - Added `pipeline()` static method to `MepCLI` in `src/core.ts`. - Exported `Pipeline` in `src/index.ts`. - Added example script `examples/pipeline-demo.ts`. - Fixed existing lint error in `src/prompts/code.ts`.
irossmini commented 2026-02-02 23:01:47 +00:00 (Migrated from github.com)

In this commit:

  • Added TaskRunner class in src/tasks.ts for concurrent task management.
  • Implemented zero-dependency "Linear Scan Diffing" rendering logic.
  • Added MepCLI.tasks() static method in src/core.ts.
  • Updated Pipeline to support passing TaskRunner instance.
  • Added TaskStatus, TaskConfig, etc., to src/types.ts.
  • Added generateProgressBar utility in src/utils.ts.
  • Added console hijacking to buffer logs during task execution.
  • Added usage example in examples/task-runner.ts.
In this commit: - Added `TaskRunner` class in `src/tasks.ts` for concurrent task management. - Implemented zero-dependency "Linear Scan Diffing" rendering logic. - Added `MepCLI.tasks()` static method in `src/core.ts`. - Updated `Pipeline` to support passing `TaskRunner` instance. - Added `TaskStatus`, `TaskConfig`, etc., to `src/types.ts`. - Added `generateProgressBar` utility in `src/utils.ts`. - Added console hijacking to buffer logs during task execution. - Added usage example in `examples/task-runner.ts`.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-03 02:56:57 +00:00
@ -0,0 +1,230 @@
import { BreadcrumbPrompt } from './breadcrumb';
github-code-quality[bot] (Migrated from github.com) commented 2026-02-03 02:56:57 +00:00

Useless assignment to local variable

The value assigned to localScrollTop here is unused.


In general, to fix a "useless assignment to local variable" you either (a) remove the variable and its assignments if they are truly unused, or (b) refactor the code so the variable’s value is actually used in the intended logic. Here, the windowing logic for search mode is already implemented using start and this.searchCursor, making localScrollTop redundant.

The best fix with no behavior change is to completely remove the localScrollTop variable and its accompanying conditional block (lines 169–174). The rest of the logic, starting at const half = Math.floor(pageSize / 2);, remains untouched and continues to control which slice of this.filteredEntries is displayed. No imports, new methods, or definitions are required; we are only deleting unused code and some now-misleading comments about reusing scroll logic.

Concretely, in src/prompts/breadcrumb-search.ts, inside the else branch that handles this.filteredEntries.length > 0, remove the block:

             // Reuse scrollTop logic but locally
             let localScrollTop = 0;
             if (this.searchCursor < localScrollTop) {
                 localScrollTop = this.searchCursor;
             } else if (this.searchCursor >= localScrollTop + pageSize) {
                 localScrollTop = this.searchCursor - pageSize + 1;
             }
             // But wait, `localScrollTop` isn't persisted across renders.
             // We should persist it or derive it from searchCursor assuming we want to keep cursor in view.
             // Since we re-render whole frame, we can just compute "window" around searchCursor.
         // Simplest: Always show cursor in view. 
         // We can't really do smooth scrolling without state. 
         // Let's assume we show a window where cursor is roughly middle or just clamped.
         // Actually, the base class persists `scrollTop`. We can use a separate property if we want,
         // but `this.scrollTop` is protected. We can use it for search mode too?
         // But switching back and forth might mess it up.
         // Let's rely on calculating start index.

and directly follow the comment about keeping it simple with the half/start calculation that is already present.

## Useless assignment to local variable The value assigned to localScrollTop here is unused. --- In general, to fix a "useless assignment to local variable" you either (a) remove the variable and its assignments if they are truly unused, or (b) refactor the code so the variable’s value is actually used in the intended logic. Here, the windowing logic for search mode is already implemented using <code>start</code> and <code>this.searchCursor</code>, making <code>localScrollTop</code> redundant.</p> <p>The best fix with no behavior change is to completely remove the <code>localScrollTop</code> variable and its accompanying conditional block (lines 169–174). The rest of the logic, starting at <code>const half = Math.floor(pageSize / 2);</code>, remains untouched and continues to control which slice of <code>this.filteredEntries</code> is displayed. No imports, new methods, or definitions are required; we are only deleting unused code and some now-misleading comments about reusing scroll logic.</p> <p>Concretely, in <code>src/prompts/breadcrumb-search.ts</code>, inside the <code>else</code> branch that handles <code>this.filteredEntries.length &gt; 0</code>, remove the block:</p> <pre><code> // Reuse scrollTop logic but locally let localScrollTop = 0; if (this.searchCursor &lt; localScrollTop) { localScrollTop = this.searchCursor; } else if (this.searchCursor &gt;= localScrollTop + pageSize) { localScrollTop = this.searchCursor - pageSize + 1; } // But wait, `localScrollTop` isn't persisted across renders. // We should persist it or derive it from searchCursor assuming we want to keep cursor in view. // Since we re-render whole frame, we can just compute "window" around searchCursor. // Simplest: Always show cursor in view. // We can't really do smooth scrolling without state. // Let's assume we show a window where cursor is roughly middle or just clamped. // Actually, the base class persists `scrollTop`. We can use a separate property if we want, // but `this.scrollTop` is protected. We can use it for search mode too? // But switching back and forth might mess it up. // Let's rely on calculating start index. </code></pre> <p>and directly follow the comment about keeping it simple with the <code>half</code>/<code>start</code> calculation that is already present.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-03 02:56:57 +00:00

Useless assignment to local variable

The value assigned to localScrollTop here is unused.


In general, to fix a useless assignment to a local variable, either (a) remove the variable and all its assignments if its value is truly unused, or (b) if the variable was intended to control logic, refactor the code so that its value is actually used in the subsequent computation. Here, the windowing logic for the visible entries is already correctly expressed using start, and localScrollTop is not referenced anywhere after being computed, so the safest fix that does not alter behavior is to delete the unused variable and its conditional updates.

Concretely, in src/prompts/breadcrumb-search.ts, within the else branch that handles this.filteredEntries.length !== 0, you should remove the declaration let localScrollTop = 0; and the subsequent if/else if block that updates it. Then the code will go directly from computing pageSize and initializing start to the half/start window calculation around this.searchCursor. No new imports or helper methods are required; this is a pure deletion of dead code.

## Useless assignment to local variable The value assigned to localScrollTop here is unused. --- In general, to fix a useless assignment to a local variable, either (a) remove the variable and all its assignments if its value is truly unused, or (b) if the variable was intended to control logic, refactor the code so that its value is actually used in the subsequent computation. Here, the windowing logic for the visible entries is already correctly expressed using <code>start</code>, and <code>localScrollTop</code> is not referenced anywhere after being computed, so the safest fix that does not alter behavior is to delete the unused variable and its conditional updates.</p> <p>Concretely, in <code>src/prompts/breadcrumb-search.ts</code>, within the <code>else</code> branch that handles <code>this.filteredEntries.length !== 0</code>, you should remove the declaration <code>let localScrollTop = 0;</code> and the subsequent <code>if</code>/<code>else if</code> block that updates it. Then the code will go directly from computing <code>pageSize</code> and initializing <code>start</code> to the <code>half</code>/<code>start</code> window calculation around <code>this.searchCursor</code>. No new imports or helper methods are required; this is a pure deletion of dead code.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-03 02:56:57 +00:00

Unused variable, import, function or class

Unused variable width.


In general, the right fix for an unused variable is to either remove it or start using it meaningfully. Since the current simplified implementation does not use terminal width for any rendering logic, the safest change that does not alter behavior is to remove the unused declaration.

Specifically, in src/prompts/breadcrumb-search.ts, inside the render(firstRender: boolean) method, remove the line const width = this.stdout.columns || 80; (currently line 147). No other code references width, so no additional changes or imports are needed. This preserves all existing functionality and simply eliminates the dead variable that CodeQL flags.

## Unused variable, import, function or class Unused variable width. --- In general, the right fix for an unused variable is to either remove it or start using it meaningfully. Since the current simplified implementation does not use terminal width for any rendering logic, the safest change that does not alter behavior is to remove the unused declaration.</p> <p>Specifically, in <code>src/prompts/breadcrumb-search.ts</code>, inside the <code>render(firstRender: boolean)</code> method, remove the line <code>const width = this.stdout.columns || 80;</code> (currently line 147). No other code references <code>width</code>, so no additional changes or imports are needed. This preserves all existing functionality and simply eliminates the dead variable that CodeQL flags.
Sign in to join this conversation.
No description provided.