Working with tasks
Workspaces and issues
Group repositories, read issues from Jira queries or write local stories, and switch between workspaces.
A workspace is a named group of repositories with its own Jira queries, for example the services and micro frontends of one product area. Every task belongs to one workspace and opens on one of its repositories. Issues come from Jira through the workspace's saved queries, or from local stories you write in Lonca, with or without Jira.
Switching between workspaces
All workspaces live in the same window. With two or more, the workspace switcher, a menu at the top of the task list, picks one; ⌘1…⌘9 switch too. With one, the switcher is not shown and the list's header names the repository instead. The task list, its search and its filters narrow to the selected workspace.
- Nothing that needs you is hidden. A workspace you are not looking at shows a badge with the number of its tasks under Needs you; an unread warning there colours it, and a warning with nothing under Needs you shows a dot without a number. The closed switcher adds up the badges of the others.
- Shared across workspaces: notifications, ports and the tmux server.
- A task that belongs to another workspace switches the window to that workspace when it is opened.
Adding and changing workspaces
The Configurator writes your first workspace from the wizard. Add, rename or remove workspaces under Settings → Workspaces (Add workspace), or ask the Configurator (the icon in the title bar). Removing a workspace keeps its tasks; they can be moved to another workspace.
workspaces:
- id: sales # [a-z][a-z0-9-]*; tasks remember their workspace by it
label: Sales # its name in the workspace switcher
repos:
- path: ~/Projects/sales-api
run: ./gradlew bootRun
- path: ~/Projects/sales-mfe
jira_queries:
- label: My open issues
jql: project = SALES AND assignee = currentUser() AND statusCategory != Done
- id: personal
label: Personal
repos:
- path: ~/Projects/my-appRepositories
Each entry under a workspace's repos:
| Key | Default | What it does |
|---|---|---|
path | required | The repository folder. ~/ is expanded. |
id | the folder name | A name for the repository in its workspace (Sales_API becomes sales-api). Needed when two folders share a name. |
base | origin/main | The branch a new worktree starts from. Lonca keeps the local copy of it current, by fast-forward only, and every task works from it. |
branch_pattern | feature/{{issueKey}}-{{slug}} | The new branch’s name; the slug comes from the issue title, at most 48 characters. |
run | none | What Run App starts in a worktree, such as pnpm dev. |
run_ports | none | The port pools the app runs on. See Worktrees and setup. |
Tests, the gate, E2E and sign-in are per repository too; see config.yaml reference. A repository you add under Settings → Workspaces has none of them yet: its card says Not set up, with Set up with Configurator, and the Configurator writes its entry from the repository (see Setting up a new repository). When a workspace has several repositories, the task's card in the list names its repository, and the issue picker asks which one a new task opens on.
Starting a new project
Beside Add repository…, in first setup and under Settings → Workspaces, New project… makes an empty git repository and adds it like any other. It asks for a Project name (the new folder's name) and a Parent folder (where the new folder goes, typed or picked with Choose…), and shows the full path. Create makes An empty git repository on main, with a README and one commit as you. No remote.
- The name is one folder, not a path: no
/or\, no space at either end, not starting with-or a dot, at most 100 characters. - The folder may exist only if it is empty. One that is already a git repository is refused: add it with Add repository… instead.
- The commit uses your own git identity. When git does not know it yet, the form shows the two
git config --globallines to set it once, then press Create again. If anything fails, Lonca takes back only what it made. - A new project has no commands yet, so the Configurator gives it only its
pathandbase, with norun, tests, gate or E2E, and says so in its report. Run Check my configuration once the first tasks have added them.
One repository in several workspaces
A shared host app or a common library can be listed in several workspaces. Its settings are looked up by path, so they must be identical everywhere it appears; a mismatch fails loading and names the path and both workspaces. Only the id may differ. Write a folder the same way everywhere: ~/code/x in one place and ~/code/x/ in another is a load error.
Tasks without a workspace
At each start, a task with no workspace whose repository sits in exactly one workspace is placed there by itself. Any other task, such as one whose repository is in two workspaces, appears under a banner above the list: N tasks have no workspace., with how many of them need you. Assign… opens Assign to a workspace, which offers, per task, the workspaces that list its repository (every workspace when none does). Assigning is reversible, so it asks for no confirmation. Delete… beside a task there deletes it with the usual confirmation (see Archiving and deleting).
Jira queries
Each workspace lists its own saved queries under jira_queries, each a label and a jql of at most 2000 characters. Only the label reaches the interface: the picker offers queries by name, and the JQL stays in Lonca's main process. Lonca opens an issue only when it is among the chosen query's current results.
- The connection (site address, account email, API token) is under Settings → Jira connection. The token is stored encrypted with the macOS Keychain, never in
config.yaml. - Lonca reads the statuses of your tasks' issues every three minutes and when you come back to its window, and updates the list when one changes. An issue Jira no longer finds keeps the last status read, and the task says Jira no longer finds this issue; see Moving the issue yourself.
- An issue changed in Jira after Lonca last read it shows Updated in Jira; see Refresh and When the issue changes.
- Without an
atlassian:block, Jira and Confluence are off and Lonca runs on local stories.
Picking an issue
Pick an issue (the + at the top of the task list) opens the picker for the selected workspace, Pick issues (Pick issues · Sales when there are several workspaces). It is always there, since local stories need no tracker.
- The repository comes first, under Repo: with several, choose the one the new task opens on (one chip per repository). The picker always writes it out: The new task will be linked to this repo, with its path.
- Choose a source: one button per saved Jira query, then Local · Open and Local · All for local stories.
- Narrow the list with Search: key, title, status, the type and status filters, and the sort (Key, Recently updated, Priority, Status, Type). The count shows how many of the results are visible (
12/40 issues). - Click an issue. Lonca creates the task and selects it. Or tick several issues' boxes and press Add 3 tasks: Lonca creates one task per issue, one after another, and says in one line how many were added and which were skipped, with why. Up to 50 at once.
- An issue that already has a task (not archived or deleted, in any workspace) is faded and marked On the board. Clicking it leads to that task; no second one is made.
- An issue whose earlier task you archived or deleted asks first: This issue was picked up before. Choose Restore the archived one (or the deleted one) to pick up where you left off, or Open a new revision: REV1 for a new task with its own branch and setup.
- An issue you ticked whose earlier task is in the archive, or was deleted, is not added: the line names it, and its row's own click asks as above.
- Each row's status is the status menu, as in a task's header: you can move an issue before it has a task (see Moving the issue yourself).
- A local story file that cannot be read is listed with the reason, and cannot be opened.
Creating a task does not set up its worktree yet: the task opens on its Flow tab, and handing it off sets the worktree up as the first stage. See Worktrees and setup.
Local stories
A local story is Lonca's own issue source: a Markdown file per story, available with or without Jira. Each one lives in a folder of its own, which is also the task's context folder:
<root>/SL-1/SL-1.md the story: YAML frontmatter and a Markdown body
<root>/SL-1/ac.md the acceptance criteria, written by Lonca
<root>/SL-1/pipeline/ the pipeline's files, once it is handed offThe frontmatter holds key, title, status, created, updated and acceptance_criteria as a list. You can edit the file by hand; Lonca watches the folder. Lonca itself only ever changes status and updated, and never deletes a story.
Prefix and folder
workspaces:
- id: sales
local_tasks:
prefix: SL # default: the id in capitals, hyphens dropped (SALES); [A-Z][A-Z0-9]*
root: sales # default: <issues.root>/local; a relative root goes under <issues.root>/local/- Keys are unique across every tracker, so two workspaces may not share a prefix, even with different folders.
- A prefix may not be a Jira project named in the same workspace's queries: loading fails and says to set
local_tasks.prefixto something else. Otherwise a local key could collide with a Jira issue that does not exist yet. - The folder is made when the first story is saved, and watched from then on.
Writing a local story
In the picker, New local story opens the form. With Background AI set up (under Settings → Agents), it opens on Draft with AI; Write it myself opens the fields instead. Without it, the fields are open from the start.
Draft with AI
Write a few lines about the story under Draft with AI and press Draft with AI (or ⌘Enter). The AI reads the chosen repository and fills in the title, the description and the criteria; nothing is saved until you save the story. Its steps show under the box as it goes. If the form already has your text, it asks Replace what you wrote?: Replace or Keep my text. If files changed in the repository while it drafted, it lists them; Lonca does not revert them.
- Drafts in the background. With Keep drafting in the background if I close this ticked (it starts unticked, and Lonca remembers your choice), closing the window does not stop the draft. When it is ready, the bell says Story draft ready, and its row opens the form with the draft put in. Unticked, closing the form cancels it.
- A draft started while another runs waits its turn (Queued behind another draft…). The form lists the workspace's other drafts with their state (Queued, Running, Ready, Failed, Stopped), with Open for a ready one, Use idea for one that failed or stopped, and Cancel or Delete. A workspace keeps up to ten. A draft Lonca quit in the middle of is stopped, never run again.
The fields
- Title (up to 200 characters) and Description in Markdown (up to 20,000). You can paste images into the description and the idea, or attach files (see Message boxes); a story takes a file's own path, since it outlives the box.
- Acceptance criteria, each in its own field, up to 50 (Add criterion). Each has an E2E switch: off, the criterion stays out of the E2E check. A repository without an
e2e:block gives no criterion an E2E check, and the form says so. - Save story writes the file, closes the form and selects the story in Local · Open; click it to create the task. Save and add another writes it and keeps the form open, empty, with Saved SL-4: … above it and the AI first again, so you can enter stories one after another. Cancel asks Discard this draft? when you have written something.
Local story statuses
A local story has six statuses, and any may follow any:
Ready for Analysis · Analysis · Ready for Development · Development · Code Review · Done- Move a story from the status chip in the task's header, which writes the new
statusto the story file, or change it in the file yourself. The key in the task's header opens the story file. - Opening a task on a story in Ready for Development moves it to Development. If that fails, the task opens anyway and says to set the status in the story file.
- The pipeline's moves (
orchestration.jira.on_start,on_pr,on_merge) apply to a story too, when the status they name is one of these six; see How the issue moves in Jira. - Deleting a local task can also delete Lonca's notes for the story (
ac.md). The story file, the folder and everything else in it stay, aprogress.mdan earlier version wrote included.
The issues folder
Everything Lonca writes about issues goes into one folder, outside your repositories, so none of it ends up in commit history:
issues:
root: ~/.lonca/issues # absolute, or starting with ~/
atlassian:
jira:
ticket_root: jira # → ~/.lonca/issues/jira, one folder per Jira issueChange it under Settings → Workspaces. When the old folder holds anything, Save asks first:
| Choice | What happens |
|---|---|
| Save and move | The folders move to the new place when Lonca restarts, before anything else starts, with every path Lonca keeps for them. A task whose stage agent is at work keeps its folder until that step ends. |
| Save without moving | The old folders stay; their tasks go on finding them where they were recorded. |
| Cancel | Nothing is saved. |
The database is backed up before a move, nothing at the new place is overwritten (a file that differs is kept beside it under another name), and a move between two folders inside one another is refused. A config written before the single issues folder gets a Use one issues folder button instead, which moves nothing. What goes into each issue's folder is on Task context.