Skip to content

Studio: edit a project from the Projects page, and sort it from the Updated column - #11443

Merged
shimmyshimmer merged 14 commits into
mainfrom
studio-project-row-edit
Sep 21, 2026
Merged

shimmyshimmer merged 14 commits into
mainfrom
studio-project-row-edit

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

The Projects page listed folders and little else: a row said when it was modified, and everything else meant opening the project or going back to the sidebar. This brings it up to what the sidebar already does with the same projects and the same chats.

Edit, not Rename

The row menu's Rename opened a name-only dialog, while the sidebar's Edit opens the one that owns a project's name, instructions and source folders. Both lists show the same projects, so the page opens that dialog too. Delete from it still goes through this page's own confirmation, with the "delete its files too" switch. The old rename dialog and the renameChatProject call behind it are gone.

The disclosure sits with the name

The chats arrow came after the name's flexible column, which drew it out beside Updated where it read as another row action rather than something belonging to the project. Name and arrow now share one group, so the arrow follows the end of the text, with room to its left.

Updated, and it sorts

The column was headed Modified, which is not what a project row tracks: the value has always been updatedAt. It now reads Updated and carries an arrow that points the way the list runs. One click turns it around, newest first or oldest first.

The heading also sat 40px right of its own values, because it reserved room for the menu but not for the pin button beside it. Measured with the real classes in a browser: the header started at 976 against values at 936, and both now start at 936.

The Sort by control is gone with it. It offered Activity, which is what the list already does, and Name, which the column arrow cannot point at. The search field takes the width it leaves, 256px to 448px, and drops to its own row below sm, where the two buttons beside it left it narrower than its own padding.

Row actions that are actually there

The pin and the menu are drawn on every row rather than revealed by hovering it, as the sidebar's project rows are. The disclosure still follows the cursor, and shows outright on a device that has none. The pin sits beside the menu, so the menu no longer repeats it, and each has one call site per row.

A chat under a project carries its own actions

Opening a project listed its chats with nothing to do to them but open one. Each row now has the same Updated column as the project above it, its own pin, and a menu, revealed by hovering that row so one chat's actions never answer for its neighbours.

The menu is the sidebar's: Rename, Mark as unread or read, Open chat folder, Export with the full format list and Export all chats, Archive, and Delete honouring the confirm setting. The Project submenu is left out, since these chats are in the project being looked at.

The shared parts move out of app-sidebar.tsx into features/chat/components/chat-row-menu.ts and open-chat-folder-item.tsx, and both menus draw from them: the export list, the thread ids behind a row, and the sandbox probe that answers Open chat folder. That probe had already drifted once when two callers carried their own copy. CHAT_EXPORT_OPTIONS becomes chatExportOptions() on the way, because the markdown label arrives through the feature barrel and reading it at module scope throws if the import cycle re-enters first.

Pinned keeps its folders in one-list mode

Organizing the sidebar in one list emptied Pinned of its folders, so a project pinned to the top disappeared along with the Projects section the setting was actually about. Pinning is its own grouping: Pinned draws its folders either way, and only the Projects section answers to the setting. The folder row is what stays: its chats do not follow it there, because in one list every project chat is already a row of the single list and a folder listing them again would draw each one twice. With nothing to expand into, the row opens its project rather than toggling. The folder ids a selection is pruned against follow the same split, so nothing is selectable that is not on screen.

The sort options are names

Priority, Last updated and Manual order each carried a caption under it saying what it does. The names say it, and the captions made that radio group twice the height of every other menu in the sidebar. The strings go with them, in all twelve languages.

Edit project, from the project page too

The project page's header menu opened a name-only Rename project dialog, while the same project offered Edit from the sidebar and from the Projects page. It opens the shared dialog now, with name, instructions and source folders, and Delete hands back to the page's own confirmation.

Deleting says what it takes

Both confirmations on this page now carry the file switch, off one state seeded per delete and cleared on commit, as openDeleteDialog does it in the sidebar. A chat delete seeds from the "always delete files" preference, so the dialog shows what is about to happen and can still be told not to for this one delete; a project workspace is a bigger thing to remove, so it asks from scratch and names the folder it would take. The confirm button reads "Delete all" while the switch is on.

Before this, the project confirmation never offered the workspace folder at all, so deleting a project always left it behind with nothing able to reach it. The project landing page's own confirmation had the same gap and gets the same switch, so deleteChatProject is now called with deleteFiles from all four call sites.

The Updated values leave on a phone

At 375px a chat row nested under a project needed 292px of content in 251px of row: the title collapsed to nothing and the row's pin and menu were pushed past the screen edge. The column's values leave below sm. Same width after: 251 in 251, with 111px of title, both actions inside the row. The project rows were squeezed the same way before this PR and get their names back too. The header keeps its control, shrunk to its label, since with the Sort by select gone it is the only way left to turn the order around.

A deleted chat lets go of its pin

deleteChatItem removes the thread and nothing else; unpinning is the sidebar wrapper's job. Deleting a pinned chat from this page left its id in local storage for good, so the page does what the sidebar does.

Six projects in the header switcher

The switcher in the chat header listed every project an account had, so twelve of them meant a twelve-row menu with "View all projects" below a scroll. It takes the six most recent, which is the order the list already arrives in.

The open project keeps a row whether or not it is among them. A project's own updatedAt moves when it is edited, not when it is used, so the one being looked at is often older than six others, and cutting it left the switcher showing no tick anywhere. It replaces the oldest of the six, so the menu is still six rows.

A row is a container, not one big button

Both list rows opened from a div carrying role="button", because nesting a button inside a button is invalid HTML. That role puts an element in ARIA's presentational-children set, so the pin, the menu and the disclosure inside the row were read as its contents rather than as controls of their own.

Opening is a real button holding only text now, with the row's controls beside it rather than inside it, and Enter and Space come with the button instead of a hand-written key handler. The project row carried the same shape before this PR and gets the same treatment. Nothing moves: name 460, disclosure 730, date 1068, pin 1240, menu 1284, measured at 1440px before and after.

Tests

tests/projects-page-rows.test.ts covers the Updated column, the disclosure's placement, the always-on row actions, the chat rows and their menu. The guards that pinned the moved helpers to app-sidebar.tsx now read them where they live. Full frontend suite: 8183 passing, tsc -b and eslint clean.

… beside the name

The row menu's Rename opened a name-only dialog, while the sidebar's Edit opens
the one that owns a project's name, instructions and source folders. Both lists
show the same projects, so the page now opens that dialog too, with Delete
still going through this page's own confirmation.

The chats disclosure sat after the name's flexible column, which drew it out by
Modified where it read as another row action. It now shares a group with the
name and follows the end of the text.
The column was headed Modified, which is not what a project row tracks, and the
header sat 40px right of its own values because it had no stand-in for the pin
button beside the menu. It now reads Updated, lines up with the values, and
carries the arrow that turns the order around: one click puts the list back on
this column, the next swaps newest and oldest first. Sorting by name hides the
arrow rather than pointing at an order it does not set.

The row menu also dropped its pin item, since the row grew a pin button of its
own and the two did the same thing.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-21T13:12:11.100233Z c159a21 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42257e541f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The row's pin, its menu and its chats disclosure are all revealed by hover, so
on a touch screen none of them are visible: dropping the menu's pin item left
an unpinned project with no way to pin it that the user can see, and the menu
behind the kebab was no way in either. All three now show outright under a
coarse pointer, the way the gallery and history rows already do, and stay
hover-revealed with a mouse.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

Right about the gap, fixed in d92fe0f.

The pin was not the only control affected: the kebab that carried the menu item is revealed the same way, and so is the chats disclosure, so on a touch screen a project row had no visible actions at all. Keeping the menu item would have hidden the fallback behind an invisible trigger, so all three now carry pointer-coarse:opacity-100, matching what the gallery and history rows already do.

Verified against the built stylesheet rather than the markup. With a touch device emulated (pointer: coarse, hover: none, 5 touch points), a control with the row's classes computes opacity: 0 without the utility and opacity: 1 with it; with a fine pointer it stays at 0 and reveals on hover, as before. The utility sits later in the sheet than .opacity-0 (byte 414785 against 198656), so it wins without an important or a specificity bump.

tests/projects-page-rows.test.ts now counts the three row controls that carry it, so losing one fails rather than going quietly.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

… arrow

The pin and the menu appeared only under the cursor, so a row said nothing
about what it could do until you found it. Both are now drawn for every row,
and the chats disclosure is the only control left following the cursor, which
is where a row's own actions belong.

The header's sort control is an arrow rather than a chevron now, pointing down
for newest first and up for oldest. The disclosure also sits a little further
off the name, with its hover circle centred on the arrow.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: d92fe0fba4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89a2a93f79

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

An open project listed its chats as titles alone, so renaming, archiving,
exporting or deleting one meant opening it first and going to the sidebar. Each
chat row now carries its updated time in the project rows' own column, a pin,
and a menu with Rename, Archive, Export and Delete, all writing through the
same helpers the sidebar's chat menu uses. Delete asks first, as deleting a
project does.

The actions belong to the chat under the cursor, so unlike a project row's they
appear on hover, and outright where there is no hover to give.
The Updated column already orders the list and says which way it runs, so the
Sort by control beside search only repeated its default. Removing it takes the
sort mode with it: the list reads the column alone, and the arrow no longer has
a state where it stands for nothing.

Search grows into the space instead, up to the width the control and its label
took.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a66bb2ffc9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The kebab on a chat under an open project offered four items while the
same chat in the sidebar offered ten, so acting on it there meant going
to the sidebar first.

The shared parts move out of app-sidebar.tsx into
features/chat/components/chat-row-menu.ts and open-chat-folder-item.tsx,
and both menus draw from them: the export list, the thread ids behind a
row, and the sandbox probe that answers Open chat folder. The probe had
already drifted once between two callers carrying their own copy.

The Projects page now carries Rename, Mark as unread/read, Open chat
folder, Export with the full format list and Export all chats, Archive
and Delete, with Delete honouring the confirm setting. The Project
submenu is left out: these chats are in the project being looked at, and
pinning stays the button beside the menu.

CHAT_EXPORT_OPTIONS becomes chatExportOptions(): the markdown label
arrives through the feature barrel, and reading it at module scope
throws if the import cycle re-enters first.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16a81aee55

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…oject from its own page

Three things.

Organizing the sidebar in one list emptied Pinned of its folders, so a
project pinned to the top disappeared along with the Projects section the
setting was about. Pinning is its own grouping: Pinned keeps its folders
either way, and only the Projects section answers to the setting. The
published chat lists, the folder ids the selection is pruned against and
the scroll-fade row count follow the same split.

The three sort options each carried a caption saying what they do. The
names say it, so the captions and their strings are gone.

The project page's header menu opened a name-only Rename project dialog
while the same project offered Edit everywhere else. It now opens the
shared Edit dialog, with Delete handing back to the page's own
confirmation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a8aae9c27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Three review findings, all correct.

Both confirmations on the Projects page now carry the file switch. A chat
delete honoured "Always delete files" as of the last commit but said
nothing about it, and the project delete never offered the workspace
folder at all, so deleting a project from the reused Edit dialog left its
files behind with nothing able to reach them. One switch, seeded per
delete and cleared after it, as the sidebar does it: a chat follows the
preference, a project workspace asks from scratch, and the button reads
"Delete all" when files go too.

The Updated column leaves below sm. At 375px a nested chat row needed
292px in 251px: the title collapsed to nothing and the row's pin and menu
were pushed past the screen. Measured after: 251 in 251, with 111px of
title. The project rows above them gain their names back at that width
too.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a9445827ca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…the pin it deletes

Two more review findings, both correct.

In one list every project chat is already a Recents row, so letting a
pinned folder expand drew each of its chats twice and published both
copies to the walk and the selection. Folder children stay gated on the
organization. The folder row itself stays in Pinned, and since there is
nothing to expand into there, it opens its project instead of toggling
into an empty block.

Deleting a chat from the Projects page left its pinned id in local
storage: pins are stored apart from the chats, and deleteChatItem does
not touch them. It unpins after a successful delete now, as the
sidebar's own wrapper does.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 015eea37a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

… own page

The last of the project delete paths. The landing page's confirmation
called deleteChatProject with no deleteFiles and said nothing about the
folder, so deleting a project from there always left its workspace with
nothing able to reach it, and reusing the Edit dialog gave that path a
second entrance.

It now carries the same switch the sidebar and the Projects page do,
described with the project's own rootPath, off one state seeded by
whichever delete opened the dialog: a chat from the preference, a
project workspace from scratch.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7387280cd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Two review findings, both correct.

Hiding the Updated column below sm took the sort control with it, and the
Sort by select it replaced is gone, so a phone had no way to turn the
order around at all. Only the width goes now: the control shrinks to its
label and keeps working, while the row values stay hidden.

The header's control group took min-w-0 flex-1 to claim the room the Sort
by select left, which also stopped it wrapping. At 375px the import and
New project buttons left the search field 59px against 56px of its own
padding, so it was 3px of text behind an icon. It takes its own row below
sm: 114px of text there, and nothing changes from sm up.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

The switcher listed the whole account, so twelve projects meant a twelve
row menu with View all projects under a scroll. It takes the six most
recent now, which is what the list already arrives as.

The open project keeps a row whether or not it is among them: a project's
own updatedAt moves when it is edited, not when it is used, so the one
being looked at is often older than six others, and cutting it left the
switcher with no tick anywhere. It replaces the oldest of the six, so the
menu is still six rows.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a809313329

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

role="button" puts an element in ARIA's presentational-children set, so a
row carrying it swallowed the roles of the pin, the menu and the
disclosure nested inside it: a screen reader read one control where there
are three or four. The row was a div with that role because nesting a
button inside a button is invalid HTML.

Both rows are plain containers now, and opening is a real button holding
only text, so Enter and Space come with it and the row's own controls sit
beside it rather than inside it. The chat row is this PR's; the project
row carried the same shape before it.

Nothing moves: measured at 1440px, name 460, disclosure 730, date 1068,
pin 1240, menu 1284, chat title 500 by 556, all unchanged. The
disclosure expands without navigating, the pin pins, the menu opens, and
the row button opens the project or the chat.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: c159a21d52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shimmyshimmer
shimmyshimmer merged commit 2980768 into main Sep 21, 2026
38 of 43 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio-project-row-edit branch September 21, 2026 13:23
shimmyshimmer pushed a commit that referenced this pull request Sep 21, 2026
Conflict in projects-page.tsx only: #11443 restructured the row, so
take its version and re-apply the wash conversion to it. Its new row
assertion moves to the converted class.
shimmyshimmer pushed a commit that referenced this pull request Sep 21, 2026
Conflict in projects-page.tsx only: #11443 rewrote that section and
dropped pr-5 from the chat list. Kept its layout, kept the scaled
pl-[76px].
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…pdated column (unslothai#11443)

* Studio: edit a project from the Projects page, and put its disclosure beside the name

The row menu's Rename opened a name-only dialog, while the sidebar's Edit opens
the one that owns a project's name, instructions and source folders. Both lists
show the same projects, so the page now opens that dialog too, with Delete
still going through this page's own confirmation.

The chats disclosure sat after the name's flexible column, which drew it out by
Modified where it read as another row action. It now shares a group with the
name and follows the end of the text.

* Studio: sort the Projects list from its Updated column

The column was headed Modified, which is not what a project row tracks, and the
header sat 40px right of its own values because it had no stand-in for the pin
button beside the menu. It now reads Updated, lines up with the values, and
carries the arrow that turns the order around: one click puts the list back on
this column, the next swaps newest and oldest first. Sorting by name hides the
arrow rather than pointing at an order it does not set.

The row menu also dropped its pin item, since the row grew a pin button of its
own and the two did the same thing.

* Studio: show a project row's actions where there is no hover

The row's pin, its menu and its chats disclosure are all revealed by hover, so
on a touch screen none of them are visible: dropping the menu's pin item left
an unpinned project with no way to pin it that the user can see, and the menu
behind the kebab was no way in either. All three now show outright under a
coarse pointer, the way the gallery and history rows already do, and stay
hover-revealed with a mouse.

* Studio: keep a project row's pin and menu on show, and point the sort arrow

The pin and the menu appeared only under the cursor, so a row said nothing
about what it could do until you found it. Both are now drawn for every row,
and the chats disclosure is the only control left following the cursor, which
is where a row's own actions belong.

The header's sort control is an arrow rather than a chevron now, pointing down
for newest first and up for oldest. The disclosure also sits a little further
off the name, with its hover circle centred on the arrow.

* Studio: give a project's chats the row actions the sidebar has

An open project listed its chats as titles alone, so renaming, archiving,
exporting or deleting one meant opening it first and going to the sidebar. Each
chat row now carries its updated time in the project rows' own column, a pin,
and a menu with Rename, Archive, Export and Delete, all writing through the
same helpers the sidebar's chat menu uses. Delete asks first, as deleting a
project does.

The actions belong to the chat under the cursor, so unlike a project row's they
appear on hover, and outright where there is no hover to give.

* Studio: drop the Projects sort control and give search its room

The Updated column already orders the list and says which way it runs, so the
Sort by control beside search only repeated its default. Removing it takes the
sort mode with it: the list reads the column alone, and the arrow no longer has
a state where it stands for nothing.

Search grows into the space instead, up to the width the control and its label
took.

* Studio: give a project's chats the sidebar's chat menu

The kebab on a chat under an open project offered four items while the
same chat in the sidebar offered ten, so acting on it there meant going
to the sidebar first.

The shared parts move out of app-sidebar.tsx into
features/chat/components/chat-row-menu.ts and open-chat-folder-item.tsx,
and both menus draw from them: the export list, the thread ids behind a
row, and the sandbox probe that answers Open chat folder. The probe had
already drifted once between two callers carrying their own copy.

The Projects page now carries Rename, Mark as unread/read, Open chat
folder, Export with the full format list and Export all chats, Archive
and Delete, with Delete honouring the confirm setting. The Project
submenu is left out: these chats are in the project being looked at, and
pinning stays the button beside the menu.

CHAT_EXPORT_OPTIONS becomes chatExportOptions(): the markdown label
arrives through the feature barrel, and reading it at module scope
throws if the import cycle re-enters first.

* Studio: keep pinned folders in Pinned in one-list mode, and edit a project from its own page

Three things.

Organizing the sidebar in one list emptied Pinned of its folders, so a
project pinned to the top disappeared along with the Projects section the
setting was about. Pinning is its own grouping: Pinned keeps its folders
either way, and only the Projects section answers to the setting. The
published chat lists, the folder ids the selection is pruned against and
the scroll-fade row count follow the same split.

The three sort options each carried a caption saying what they do. The
names say it, so the captions and their strings are gone.

The project page's header menu opened a name-only Rename project dialog
while the same project offered Edit everywhere else. It now opens the
shared Edit dialog, with Delete handing back to the page's own
confirmation.

* Studio: say what a delete takes, and give a narrow row its title back

Three review findings, all correct.

Both confirmations on the Projects page now carry the file switch. A chat
delete honoured "Always delete files" as of the last commit but said
nothing about it, and the project delete never offered the workspace
folder at all, so deleting a project from the reused Edit dialog left its
files behind with nothing able to reach them. One switch, seeded per
delete and cleared after it, as the sidebar does it: a chat follows the
preference, a project workspace asks from scratch, and the button reads
"Delete all" when files go too.

The Updated column leaves below sm. At 375px a nested chat row needed
292px in 251px: the title collapsed to nothing and the row's pin and menu
were pushed past the screen. Measured after: 251 in 251, with 111px of
title. The project rows above them gain their names back at that width
too.

* Studio: keep a pinned folder from listing its chats twice, and clear the pin it deletes

Two more review findings, both correct.

In one list every project chat is already a Recents row, so letting a
pinned folder expand drew each of its chats twice and published both
copies to the walk and the selection. Folder children stay gated on the
organization. The folder row itself stays in Pinned, and since there is
nothing to expand into there, it opens its project instead of toggling
into an empty block.

Deleting a chat from the Projects page left its pinned id in local
storage: pins are stored apart from the chats, and deleteChatItem does
not touch them. It unpins after a successful delete now, as the
sidebar's own wrapper does.

* Studio: offer the workspace folder when a project is deleted from its own page

The last of the project delete paths. The landing page's confirmation
called deleteChatProject with no deleteFiles and said nothing about the
folder, so deleting a project from there always left its workspace with
nothing able to reach it, and reusing the Edit dialog gave that path a
second entrance.

It now carries the same switch the sidebar and the Projects page do,
described with the project's own rootPath, off one state seeded by
whichever delete opened the dialog: a chat from the preference, a
project workspace from scratch.

* Studio: keep sorting and a usable search on a phone

Two review findings, both correct.

Hiding the Updated column below sm took the sort control with it, and the
Sort by select it replaced is gone, so a phone had no way to turn the
order around at all. Only the width goes now: the control shrinks to its
label and keeps working, while the row values stay hidden.

The header's control group took min-w-0 flex-1 to claim the room the Sort
by select left, which also stopped it wrapping. At 375px the import and
New project buttons left the search field 59px against 56px of its own
padding, so it was 3px of text behind an icon. It takes its own row below
sm: 114px of text there, and nothing changes from sm up.

* Studio: show six projects in the header switcher, not every one

The switcher listed the whole account, so twelve projects meant a twelve
row menu with View all projects under a scroll. It takes the six most
recent now, which is what the list already arrives as.

The open project keeps a row whether or not it is among them: a project's
own updatedAt moves when it is edited, not when it is used, so the one
being looked at is often older than six others, and cutting it left the
switcher with no tick anywhere. It replaces the oldest of the six, so the
menu is still six rows.

* Studio: make each row control its own button, not the contents of one

role="button" puts an element in ARIA's presentational-children set, so a
row carrying it swallowed the roles of the pin, the menu and the
disclosure nested inside it: a screen reader read one control where there
are three or four. The row was a div with that role because nesting a
button inside a button is invalid HTML.

Both rows are plain containers now, and opening is a real button holding
only text, so Enter and Space come with it and the row's own controls sit
beside it rather than inside it. The chat row is this PR's; the project
row carried the same shape before it.

Nothing moves: measured at 1440px, name 460, disclosure 730, date 1068,
pin 1240, menu 1284, chat title 500 by 556, all unchanged. The
disclosure expands without navigating, the pin pins, the menu opens, and
the row button opens the project or the chat.
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.

1 participant