Conversation
Pull Request GuideFollow these conventions so every PR is easy to navigate, review, and merge. 1. Branch NamingGeneral rules
Branch prefixes
2. PR TitleEvery PR title must start with a status tag followed by the branch purpose. Status tags
Update the tag as the PR progresses — move from Examples
3. PR DescriptionEvery PR description must include these sections: What changedA clear bulleted list of the concrete changes. Not a copy of the commit log — a human-readable summary. WhyThe reason for the change. Link the ticket / issue / conversation that prompted it. If it's a bug fix, describe the bug. How to testStep-by-step instructions a reviewer can follow to verify the change end-to-end. Include:
Screenshots (frontend PRs only)Required for any PR that touches UI. Include:
Use the GitHub image upload (drag and drop into the description box) — do not link to external image hosts. 4. Example PR Description## What changed
- Added `CreatedByBadge` component shared between Feedback and Chats pages
- Role-gated the badge to org admins only via `useAuth` hook
- Added `user_role` to the login response so the frontend can determine admin status
## Why
Org admins need to see who authored each feedback/chat entry for accountability.
Regular users always see their own content, so the createdBy chip is redundant for them.
Linked issue: #142
## How to test
1. Log in as `admin_user@emai.com` (role: `admin`)
2. Open `http://localhost/deadbytes-org/feedback?page=1` — avatar chip should appear on rows with a `createdBy`
3. Open `http://localhost/deadbytes-org/chats?page=1` — same behaviour
4. Log in as a regular user — the chip should NOT appear on either page
## Screenshots
### Feedback page — admin view
[screenshot-admin-feedback.png]
### Feedback page — regular user view
[screenshot-user-feedback.png]5. Checklist Before Marking
|
|
Also please resolve your conflicts |
Resolves conflicts between the interactive TUI menu work and main's new setup wizard / serverLifecycle (embedded-mode) refactor: - index.ts/program.ts: keep the menu-based entry, register main's new `setup` command. - ShutdownCommand: take main's stopServer()-based structure; relocate the port-based stale-pid fix into serverLifecycle.stopServer() so it still applies under the refactor. - READMEs/bun.lock: merge both sides, de-dupe main's command table. Post-merge menu updates: - Add "Connect MCP clients" (mcp install) to the menu. - Boot hint notes infra is brought up only when needed (embedded mode). - mcp stats now ensureServerRunning() first, matching stats/ls (fixes "Unable to connect" when the server is down). - Drop the one-time `setup` wizard from the menu (still a CLI command). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bharatsachya
left a comment
There was a problem hiding this comment.
1.Theme should be centralised and it should work for all the commands
2.Add a back command to go back and forth between options
3. replace bytebell with bytebell set as bytebell shows helper command
- Menu now loops: every command/form returns to the menu so you move back and forth between options. `q` backs out of a sub-screen, `Esc` leaves the TUI. - Centralize the accent in theme.ts (ACCENT + ANSI) and apply it to the plain-stdout path (output.ts spinners, tables, progress bars) so the theme covers every command, Ink or not. - Rename the binary to `bytebell-tinker` (avoids colliding with an installed `bytebell` that only prints help) plus a short `bbtinker` alias; program name + menu header updated to "Bytebell Tinker". - Setup form is mode-aware: Docker shows the Mongo/Neo4j/Redis fields, Embedded shows the SQLite/Ladybug/Queue paths; Esc returns to the menu. - Fix: the LLM provider form double-handled Tab on top of Ink's focus manager, trapping focus on the API key — now Tab reaches and edits the Model field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bharatsachya
left a comment
There was a problem hiding this comment.
Bytebell is still showing menu revert it back to older version
|
|
||
| /** Pids holding a LISTEN socket on the given TCP port, via `lsof`. Returns | ||
| * `[]` when lsof is absent or finds nothing — callers degrade gracefully. */ | ||
| function findListenerPids(port: number): Promise<number[]> { |
There was a problem hiding this comment.
findListenerPids() returns [] whenever lsof is missing or errors (by design, "degrade gracefully"). But waitForServerStopped() is built entirely on findListenerPids, so on a host without lsof it returns true immediately — stopServer sends SIGTERM, unlinks the pid file, and reports a clean stop without ever confirming the process is down. The old code waited for the pid file to vanish, which was weaker but at least waited. macOS (the stated platform) ships lsof, but the CLI is distributed cross-platform and minimal Linux images frequently lack it. Consider falling back to isAlive(pid)-polling on the resolved target pids when findListenerPids yields nothing.
| }, | ||
| "bin": { | ||
| "bytebell": "./src/index.ts" | ||
| "bytebell-tinker": "./src/index.ts", |
There was a problem hiding this comment.
no you cannot change this
What changed
bytebell-tinker(or the shortbbtinker) with no arguments opens a grouped menu (Setup / Knowledge / Server / Insights). Arrow keys move, Enter runs.qbacks out of a sub-screen to the menu;Escleaves the TUI. (On the text-entry screensEscbacks out instead, sinceqis a typed character there.)mcp installto register the bytebell MCP endpoint in your editors.theme.ts) drives every screen and the plain-stdout output (spinners, tables, progress bars), so the whole CLI is themed consistently from one place. Accent is cyan.bytebell-tinker(plus the shortbbtinkeralias) so this dev build doesn't collide with an installedbytebellthat only prints help.bytebellentry — a third binarybytebellthat shows commander help on bare invocation (no menu), keeping backward compatibility with scripts/aliases that expectbytebellto print subcommands.waitForServerStoppedfalls back toisAlive(pid)polling on resolved target PIDs whenlsofis unavailable (common on minimal Linux images), instead of returning immediately.shutdownfinds the server by its listening port (a stale pid file no longer leaves it running);statsno longer crashes on older repo records;mcp statsauto-starts the server instead of erroring.main(thesetupwizard + embedded-mode refactor) and resolved the conflicts.Why
bytebellwith no arguments just printed help, so you had to remember every subcommand. The menu makes the CLI discoverable and lets you bounce between actions. The dedicated provider screen removes the most common config friction, and the shutdown/stats/mcp fixes address real failures hit while testing.The third
bytebellbinary keeps the old behavior (help on bare invocation) for scripts whilebytebell-tinker/bbtinkerdrive the interactive TUI. The shutdown lsof fallback prevents the CLI from falsely reporting a clean stop on hosts withoutlsof.How to test
qin a sub-screen to go back,Escto leave.bytebellnon-TUI — run without arguments, confirm it prints help (not the menu):←/→: Docker shows Mongo/Neo4j/Redis, Embedded shows the SQLite/Ladybug/Queue paths.bbtinker shutdown --keep-docker lsof -nP -iTCP:8080 -sTCP:LISTEN # empty afterwardsScreenshots
Terminal render of the menu (cyan accent not shown in plain text):
Non-TUI
bytebellhelp output: