-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add TUI mode with vim-like keybindings, mouse support, and full screen set #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1315cda
06aa1a2
4295230
a9d53f9
863fb87
f3414ac
8b170f7
25db3d5
2353d94
4609a6d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /** | ||
| * Format a price for display. | ||
| * | ||
| * Currently prices are stored as major units (e.g. 14.99 USD → "$14.99"). | ||
| * This function formats consistently across CLI and TUI surfaces. | ||
| * When migrating to smallest-unit storage (cents), add a `fromCents` parameter. | ||
| */ | ||
| export function formatPrice(price: number, currency: string): string { | ||
|
Comment on lines
+4
to
+8
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift Do not bake major-unit prices into the shared formatter contract. This helper is now the shared boundary for price rendering, but its doc/signature explicitly standardize on major-unit numbers. That conflicts with the repo rule for 🤖 Prompt for AI AgentsSource: Coding guidelines |
||
| try { | ||
| return new Intl.NumberFormat("en-US", { | ||
| style: "currency", | ||
| currency, | ||
| minimumFractionDigits: 0, | ||
| maximumFractionDigits: 2, | ||
| }).format(price) | ||
| } catch { | ||
| return `${currency} ${price}` | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { render } from "ink" | ||
| import { App } from "./tui/app.tsx" | ||
|
|
||
| export async function handleTui(): Promise<void> { | ||
| const { waitUntilExit } = render(<App />, { | ||
| exitOnCtrlC: true, | ||
| patchConsole: true, | ||
| }) | ||
|
|
||
| try { | ||
| await waitUntilExit() | ||
| } catch (error) { | ||
| // App exited with an error — silently ignore for clean exit | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: nazozokc/subtrack
Length of output: 2780
🌐 Web query:
lint-staged configuration empty array meaning for a glob💡 Result:
In lint-staged, a glob pattern is expected to be a string that identifies a subset of staged files to process [1][2]. There is no native feature or documented behavior that interprets an empty array ([]) as a valid glob pattern for file matching; typically, configuration keys are expected to be strings representing valid glob patterns [1][3]. If you provide an empty array as a key in your configuration object, it will not match any files. Consequently, the commands associated with that key will not be executed, effectively acting as a no-op (no operation) for that specific configuration entry. If you are attempting to disable a lint-staged rule or prevent tasks from running, the correct approach is to remove the key-value pair from your configuration object entirely [1][2]. If you need to conditionally control which tasks run based on dynamic logic, you should use a JavaScript configuration file (e.g., lint-staged.config.js) and export a function instead of an object [1][2]. This allows you to programmatically return an empty object or skip command registration when certain conditions are met [1][3].
Citations:
Restore the staged TS tasks.
*.{ts,tsx}: []turns off alllint-stagedchecks for TypeScript files, so these changes bypass pre-commit validation entirely. Keep the remaining tasks on this glob if the only goal is to skiptypos.🤖 Prompt for AI Agents