Skip to content

Feat: add sidebar position settings - #367

Open
7eliassen wants to merge 7 commits into
mainfrom
feat/add-sidebar-settings
Open

7eliassen wants to merge 7 commits into
mainfrom
feat/add-sidebar-settings

Conversation

@7eliassen

Copy link
Copy Markdown
Contributor

Summary

Related with: codex-team/notes.api#306

Adds configurable sidebar positioning for notes and makes the setting apply consistently across parent and child notes.

Changes

Added three sidebar positions:

  • none — no sidebar
image
  • content — sidebar follows the centered content column
image
  • edge — sidebar is fixed to the left edge of the page
image

Added sidebar position controls to the note settings page.

image

Details

  • The sidebar position on the page is determined by the sidebarPosition value set on the parent note.

  • The sidebarPosition value is set via a PATCH /note-settings/:notePublicId request.

  • the value is obtained from a GET /note-settings/:notePublicId or /note-hierarchy/:notePublicId request. The value used to set the sidebar position is taken from note-hierarchy/.

  • Disabled sidebar position changes for child notes.

image

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
codex-ui Ready Ready Preview Oct 14, 2026 9:18am UTC

Comment thread src/presentation/components/noteSettings/NoteSidebarSetting.vue
Comment on lines +203 to +207
const sidebarPosition = computed<SidebarPosition>({
get: () => noteSettings.value?.sidebarPosition ?? 'content',
set: (value) => {
void updateSidebarPosition(props.id, value);
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Each selection starts a PATCH without waiting for the previous one, and the response replaces noteSettings. Selecting edge and then none quickly can leave the UI showing edge if the first response arrives last.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added race condition guard for updateSidebarPosition to prevent this bug

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If the server has content, the user picks edge and then content before response arrives, the second pick is skipped as "already selected", settingsRequestId doesn't change, and the edge response is applied. UI ends up on edge.

Could we also compare with last request value?

This branch was successfully deployed

1 active deployment
Preview — 4fa3ffaa Deployed Oct 14, 2026 by vercel[bot]
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.

3 participants