Skip to content

Comments

Dev_21_feb_solve#1033#1042

Open
DevDesai444 wants to merge 10 commits intogeneralaction:mainfrom
DevDesai444:Dev_21Feb
Open

Dev_21_feb_solve#1033#1042
DevDesai444 wants to merge 10 commits intogeneralaction:mainfrom
DevDesai444:Dev_21Feb

Conversation

@DevDesai444
Copy link
Contributor

Resolves

Resolves Feature: Auto-infer workspace names from conversation context #1033.

Issue Details (What #1033 Requested)

Current Behavior

  • Users must manually enter a workspace/task name before creation.

Expected Behavior

  • Name should not be required upfront.
  • Emdash should auto-generate a short meaningful name from conversation/task context.
  • User can still rename/override if needed.

Why This Matters

  • Reduces friction in “just start quickly” flows.
  • Matches behavior users expect from ChatGPT/Claude-style auto-titled contexts.

What This PR Changes

1) Context-based naming engine

Implemented in:

  • ./emdash/src/renderer/lib/taskNames.ts

Added inferTaskNameFromContext(...) that infers names from:

  • initial prompt text
  • linked issue context (Linear/GitHub/Jira)

Heuristics include:

  • prompt cleanup (code blocks/markdown noise removed)
  • phrase trimming (“please”, “can you”, etc.)
  • stop-word filtering + keyword extraction
  • issue-aware prefixing (gh-<number>, issue key/id)
  • uniqueness against existing names
  • fallback to friendly generated name

2) Task/workspace creation flow update

Implemented in:

  • ./emdash/src/renderer/components/TaskModal.tsx

Behavior now:

  • when auto-generate is ON, name field is optional
  • blank name is resolved from context at submit time
  • inferred name updates as prompt/linked-issue context changes
  • if user types a custom name, auto-overwrites stop

When auto-generate is OFF:

  • previous required-name behavior remains unchanged

3) Settings copy alignment

Updated in:

  • ./emdash/src/renderer/components/TaskSettingsRows.tsx

Text now clearly says name is inferred from prompt/linked issue context.

4) Tests

Added:

  • ./emdash/src/test/renderer/taskNames.test.ts

Coverage:

  • prompt-based inference
  • issue identifier prefix behavior
  • uniqueness when collisions exist
  • fallback behavior when context is empty

Validation

  • pnpm run format
  • pnpm run type-check
  • pnpm run lint (existing warnings only, no new errors)
  • pnpm exec vitest run (all tests pass)

Scope Notes

  • No DB migration needed
  • No IPC/preload API changes
  • Feature is implemented in task creation flow (task acts as workspace context in current app architecture)

@vercel
Copy link

vercel bot commented Feb 22, 2026

@DevDesai444 is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link

greptile-apps bot commented Feb 22, 2026

Greptile Summary

Implements context-aware auto-inference of task names from prompts and linked issues (GitHub/Linear/Jira). Names are now optional when auto-generation is enabled, with inference happening at modal open and dynamically updating as context changes. The feature reduces friction in quick-start workflows by matching ChatGPT/Claude-style auto-titling behavior.

Key changes:

  • Added inferTaskNameFromContext function with keyword extraction, stop-word filtering, and issue-aware prefixing
  • TaskModal now allows blank names when auto-generate is ON, resolving names at submit time
  • Name field updates reactively as prompt/issue context changes
  • Settings copy clarified to explain context-based inference
  • Tests cover prompt inference, issue prefixes, uniqueness, and fallback behavior

Issue found: Button validation logic on line 451 of TaskModal.tsx doesn't account for the new blank-name-allowed flow, potentially enabling submission when it shouldn't be allowed.

Confidence Score: 4/5

  • Safe to merge with one logical bug fix needed in button validation
  • Well-structured implementation with clear separation of concerns and good test coverage. The inference engine is solid. However, the button validation logic in TaskModal has a bug that could allow invalid submissions. Once fixed, this would be a 5/5.
  • src/renderer/components/TaskModal.tsx line 451 requires button validation fix

Important Files Changed

Filename Overview
src/renderer/lib/taskNames.ts Adds context-aware task name inference engine with keyword extraction, stop-word filtering, and issue-prefix support
src/renderer/components/TaskModal.tsx Integrates auto-inferred names with optional name field and dynamic context updates; has button validation bug
src/renderer/components/TaskSettingsRows.tsx Updated setting description to clarify context-based name inference
src/test/renderer/taskNames.test.ts Basic test coverage for prompt inference, issue identifiers, uniqueness, and fallback behavior

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User Opens Task Modal] --> B{Auto-Generate<br/>Setting Enabled?}
    B -->|Yes| C[inferNameFromContext]
    B -->|No| D[Show Empty Name Field<br/>Required]
    
    C --> E{Has Linked Issue?}
    E -->|Yes| F[Extract Issue Prefix<br/>gh-N, JIRA-KEY, etc]
    E -->|No| G[No Prefix]
    
    F --> H[Extract Keywords from<br/>Issue Title + Prompt]
    G --> H
    
    H --> I[Remove Stop Words<br/>Strip Noise]
    I --> J[Build Name:<br/>prefix-keyword1-keyword2...]
    
    J --> K{Name Exists?}
    K -->|Yes| L[Add Suffix -2, -3, etc]
    K -->|No| M[Use Name]
    L --> M
    
    M --> N[Display in Name Field]
    
    O[User Types in Field] --> P{User Input Empty?}
    P -->|Yes & Auto-Gen On| C
    P -->|No| Q[Use Custom Name]
    
    R[Submit Button Click] --> S{Name Field Empty?}
    S -->|Yes & Auto-Gen On| T[Resolve Name at Submit]
    S -->|No| U[Use Field Value]
    
    T --> V[Create Task]
    U --> V
Loading

Last reviewed commit: 158ac98

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link

greptile-apps bot commented Feb 22, 2026

Additional Comments (1)

src/renderer/components/TaskModal.tsx
Button uses stale validation state from taskName, but submit now resolves name from context if blank. This causes the button to remain enabled when it should be disabled.

          <Button type="submit" disabled={!!error || (!taskName && !isAutoGenerateEnabled)}>

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Auto-infer workspace names from conversation context

1 participant