Drive file chips, path links and image menus from the shared action list
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- developer-experience, frontend
Research direction
The issue depends on #27 and #33 and says to start from a branch containing the pending GUI interaction and mobile pass. Read apps/kiki-gui/src/state/previewResource.ts first, then trace the listed components and their existing tests. Done means the shared action list controls file and image menus, line references reach openFile, the specified screenshots are reviewed at desktop and touch phone sizes, and GUI typecheck and fast tests pass.
Written by the indexing model from the issue text.
Description
What feature would you like to see?
Outside the preview panel, every place that shows a file decides on its own what the user may do with it. The context menu of a file link in a reply offers "show in folder" and "open with default app" whenever the scope is not SSH, so in the desktop app connected to another computer's space it acts on a path on this computer: it errors when the path does not exist here, and opens an unrelated file when a file with the same path happens to exist. Path links in tool rows use a fuller remote check, image menus a third, and each has its own type rules. Path links in tool rows also drop the line number, so "go to line" only works from links in reply text.
Decided
- File chips, path links (
FilePathLink), file links in Markdown, image context menus and lightbox menus all take their actions fromresourceActionsinapps/kiki-gui/src/state/previewResource.ts. Actions that do not apply are not rendered. - The separate remote checks and type checks in these files are deleted;
isKikiComputer(fails closed) andclassifyResourceare the only answers. - On a phone, menus keep opening as the existing bottom sheet.
Design
mediaParts.tsx:FilePathLinkbuilds a live host-file resource and renders the action list in its menu (open preview, copy path, copy absolute path when it differs, show on this computer, open with default app). It accepts an optional line or heading reference and forwards it toopenFile, so tool rows that know a line can jump to it. File chips (MediaPartand friends) build their resource from the media reference and use the same list.MediaArtifactList.tsx: generated media items use the same list; their tooltip shows the display name, never the internal file id.Markdown.tsx: the file link menu inMarkdownAnchoruses the action list and drops its ownscopeId.startsWith('ssh:')check.imageActions.ts:imageMenuEntriesderives its path-dependent entries (show, open, copy path) from the action list;isRemoteConnectionis removed once nothing imports it, replaced byisKikiComputer.MediaLightbox.tsx: the lightbox menu uses the image resource's action list.
Where
apps/kiki-gui/src/components/mediaParts.tsx:443-480(FilePathLink; remote check at449; menu entries453-462; opens with the path only at470-472),:288-293(chip routing),:12(importsisRemoteConnection).apps/kiki-gui/src/components/media/MediaArtifactList.tsx:237(item button titled withitem.fileId).apps/kiki-gui/src/components/Markdown.tsx:328-443(MarkdownAnchor, SSH-only check at334).apps/kiki-gui/src/components/imageActions.ts:13-23(isRemoteConnection),:322-378(imageMenuEntries).apps/kiki-gui/src/components/MediaLightbox.tsx:41(MediaLightbox, takesremoteandsourcePath).- Shared logic:
apps/kiki-gui/src/state/previewResource.ts(from the resource model issue).
Done when
- No
isRemoteConnectionand noscopeId.startsWith('ssh:')check that gates show, open or copy remains in the GUI outsidepreviewResource.ts. - Tests: in a remote (non-SSH) space, a file link menu, a
FilePathLinkmenu and an image menu offer copy path but not show or open; on a local desktop mock host they offer all three; with no path they offer neither. - A
FilePathLinkgiven a line opens the preview at that line. - Screenshots from
apps/kiki-gui/scripts/visual-proof.mjs(tool-media,preview-media,media-messagesscenarios,--viewport wide,narrow, en and zh) show the menus at desktop width and as bottom sheets at phone width; someone looks at them. -
pnpm --filter @kiki/gui typecheckandpnpm --filter @kiki/gui test:fastpass. - Phone-width screenshots are taken in a touch context (
isMobile: true, hasTouch: true, asapps/kiki-gui/scripts/visual-proof-mobile-reading.mjs:294-300does). Phone mode is(pointer: coarse) and (max-width: 639px)(apps/kiki-gui/src/lib/layoutHooks.ts:57), so a width-only--viewport narrowrun ofvisual-proof.mjsshows the desktop layout squeezed, not the phone layout.
Additional information
mediaParts.tsx and MediaLightbox.tsx carry changes from the pending GUI interaction and mobile pass; start from a branch that includes it, after the tab-merge issue. The phone layout issue for the preview panel edits MediaLightbox.tsx after this one. The desktop shell's reveal and open commands only run in the desktop app, so the remote-space case must also be checked there by hand.
Order and scope. Paths and line numbers refer to the code after the pending GUI interaction and mobile pull request is merged into kiki.
Depends on: #27, #33.
Main files: apps/kiki-gui/src/components/mediaParts.tsx, apps/kiki-gui/src/components/media/MediaArtifactList.tsx, apps/kiki-gui/src/components/Markdown.tsx, apps/kiki-gui/src/components/imageActions.ts, apps/kiki-gui/src/components/imageActions.test.tsx, apps/kiki-gui/src/components/MediaLightbox.tsx.
- Dominant language
- TypeScript
- Stars
- 54
- Forks
- 5
- Avg merge
- 2h 54m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from X-T-E-R/kiki
-
Document PowerShell shell semantics and read-only Bash deduplication in Built-in Tools referenceOpendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 54/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
documentation
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
area: cli priority: P3 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
appandflow/stim#5640 · 1 comment ·
Maintainers usually reply within 1 day
-
Claude Code: hook systemMessage lines never reach the chatPossibly taken @chphch claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
slopus/happy-agent#139 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
NangoHQ/nango#8285 · 1 comment ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
lingdojo/kana-dojo#34009 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
paperclipai/paperclip#21197 ·
Maintainers usually reply within 1 day