Skip to content

settings_ui: Fix edit predictions and tool permissions for narrow windows#51878

Merged
danilo-leal merged 4 commits intozed-industries:mainfrom
feitreim:bugfix-settings-width
Mar 19, 2026
Merged

settings_ui: Fix edit predictions and tool permissions for narrow windows#51878
danilo-leal merged 4 commits intozed-industries:mainfrom
feitreim:bugfix-settings-width

Conversation

@feitreim
Copy link
Copy Markdown
Contributor

@feitreim feitreim commented Mar 18, 2026

Closes #51865

The Tool Permissions and Edit Prediction Providers pages have settings that do not conform very well to the usual setup, because of this they are specially defined in .../settings_ui/src/pages . Due to this setup, they do not benefit from the same automatic responsive setup as the other parts of the settings ui. This was causing issues w/ narrow windows, where fields and text were extending past the side of the window or just not displaying.
All that was needed to fix it was some tweaks to the structure and css of those pages, and its smooth sailing. Maybe in the future render_settings_item can be made broader and support these use cases as well so this doesn't have to be handled manually.

Behavior Before:

before_settings.mov

Behavior After:

after_settings.mov

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

  • Settings Editor: Fixed the display issue with narrow windows on the Edit Prediction configuration page.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 18, 2026
@zed-community-bot zed-community-bot bot added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 18, 2026
@danilo-leal danilo-leal self-assigned this Mar 18, 2026
Copy link
Copy Markdown
Member

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

Thank you so much!

@danilo-leal danilo-leal merged commit ff2e5d4 into zed-industries:main Mar 19, 2026
30 of 32 checks passed
@feitreim feitreim deleted the bugfix-settings-width branch March 19, 2026 19:36
swannysec added a commit that referenced this pull request Mar 19, 2026
…51972)

## Context

Fork PRs receive a read-only `GITHUB_TOKEN`, causing 403 errors on all
label and comment writes
([example](#51878)). This
splits the single workflow into two:

- **pr-size-check.yml** (`pull_request`): computes size and guided tour
detection, uploads a JSON artifact — read-only, works for forks
- **pr-size-label.yml** (`workflow_run`): downloads the artifact,
applies labels and comments — runs on the base repo with full write
access

### Security

- Artifact treated as untrusted data: fields are cast and validated
(`Number()`, `String()` + prefix check, `Boolean()`) before use
- No artifact content is executed or interpolated into shell
- Missing artifact handled gracefully (steps skip via output flag)

### Also included

- Structural guided tour detection: extracts "How to Review" section,
strips HTML comment placeholders, checks for actual author content
(fixes false positive in #51957)
- Softer confirmation: "appears to include guidance"

Tested locally end-to-end against 4 real PRs
(XL/small/medium/false-positive).

## How to Review

1. `pr-size-check.yml` — the compute half. Compare against the previous
version: all write operations removed, artifact upload added at the end.
2. `pr-size-label.yml` — new file. Download artifact, validate, apply
labels/comments. Same label logic as before, just in a `workflow_run`
context.

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
…dows (zed-industries#51878)

Closes zed-industries#51865 

The Tool Permissions and Edit Prediction Providers pages have settings
that do not conform very well to the usual setup, because of this they
are specially defined in .../settings_ui/src/pages . Due to this setup,
they do not benefit from the same automatic responsive setup as the
other parts of the settings ui. This was causing issues w/ narrow
windows, where fields and text were extending past the side of the
window or just not displaying.
All that was needed to fix it was some tweaks to the structure and css
of those pages, and its smooth sailing. Maybe in the future
`render_settings_item` can be made broader and support these use cases
as well so this doesn't have to be handled manually.

Behavior Before:


https://github.com/user-attachments/assets/283df746-e1bb-4791-b259-085dc83f3292

Behavior After:


https://github.com/user-attachments/assets/154c8fcf-8a02-49c8-910a-a69dc11b144f

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Settings Editor: Fixed the display issue with narrow windows on the
Edit Prediction configuration page.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
…ed-industries#51972)

## Context

Fork PRs receive a read-only `GITHUB_TOKEN`, causing 403 errors on all
label and comment writes
([example](zed-industries#51878)). This
splits the single workflow into two:

- **pr-size-check.yml** (`pull_request`): computes size and guided tour
detection, uploads a JSON artifact — read-only, works for forks
- **pr-size-label.yml** (`workflow_run`): downloads the artifact,
applies labels and comments — runs on the base repo with full write
access

### Security

- Artifact treated as untrusted data: fields are cast and validated
(`Number()`, `String()` + prefix check, `Boolean()`) before use
- No artifact content is executed or interpolated into shell
- Missing artifact handled gracefully (steps skip via output flag)

### Also included

- Structural guided tour detection: extracts "How to Review" section,
strips HTML comment placeholders, checks for actual author content
(fixes false positive in zed-industries#51957)
- Softer confirmation: "appears to include guidance"

Tested locally end-to-end against 4 real PRs
(XL/small/medium/false-positive).

## How to Review

1. `pr-size-check.yml` — the compute half. Compare against the previous
version: all write operations removed, artifact upload added at the end.
2. `pr-size-label.yml` — new file. Download artifact, validate, apply
labels/comments. Same label logic as before, just in a `workflow_run`
context.

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
…dows (zed-industries#51878)

Closes zed-industries#51865 

The Tool Permissions and Edit Prediction Providers pages have settings
that do not conform very well to the usual setup, because of this they
are specially defined in .../settings_ui/src/pages . Due to this setup,
they do not benefit from the same automatic responsive setup as the
other parts of the settings ui. This was causing issues w/ narrow
windows, where fields and text were extending past the side of the
window or just not displaying.
All that was needed to fix it was some tweaks to the structure and css
of those pages, and its smooth sailing. Maybe in the future
`render_settings_item` can be made broader and support these use cases
as well so this doesn't have to be handled manually.

Behavior Before:


https://github.com/user-attachments/assets/283df746-e1bb-4791-b259-085dc83f3292

Behavior After:


https://github.com/user-attachments/assets/154c8fcf-8a02-49c8-910a-a69dc11b144f

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Settings Editor: Fixed the display issue with narrow windows on the
Edit Prediction configuration page.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
…ed-industries#51972)

## Context

Fork PRs receive a read-only `GITHUB_TOKEN`, causing 403 errors on all
label and comment writes
([example](zed-industries#51878)). This
splits the single workflow into two:

- **pr-size-check.yml** (`pull_request`): computes size and guided tour
detection, uploads a JSON artifact — read-only, works for forks
- **pr-size-label.yml** (`workflow_run`): downloads the artifact,
applies labels and comments — runs on the base repo with full write
access

### Security

- Artifact treated as untrusted data: fields are cast and validated
(`Number()`, `String()` + prefix check, `Boolean()`) before use
- No artifact content is executed or interpolated into shell
- Missing artifact handled gracefully (steps skip via output flag)

### Also included

- Structural guided tour detection: extracts "How to Review" section,
strips HTML comment placeholders, checks for actual author content
(fixes false positive in zed-industries#51957)
- Softer confirmation: "appears to include guidance"

Tested locally end-to-end against 4 real PRs
(XL/small/medium/false-positive).

## How to Review

1. `pr-size-check.yml` — the compute half. Compare against the previous
version: all write operations removed, artifact upload added at the end.
2. `pr-size-label.yml` — new file. Download artifact, validate, apply
labels/comments. Same label logic as before, just in a `workflow_run`
context.

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
…dows (zed-industries#51878)

Closes zed-industries#51865 

The Tool Permissions and Edit Prediction Providers pages have settings
that do not conform very well to the usual setup, because of this they
are specially defined in .../settings_ui/src/pages . Due to this setup,
they do not benefit from the same automatic responsive setup as the
other parts of the settings ui. This was causing issues w/ narrow
windows, where fields and text were extending past the side of the
window or just not displaying.
All that was needed to fix it was some tweaks to the structure and css
of those pages, and its smooth sailing. Maybe in the future
`render_settings_item` can be made broader and support these use cases
as well so this doesn't have to be handled manually.

Behavior Before:


https://github.com/user-attachments/assets/283df746-e1bb-4791-b259-085dc83f3292

Behavior After:


https://github.com/user-attachments/assets/154c8fcf-8a02-49c8-910a-a69dc11b144f

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Settings Editor: Fixed the display issue with narrow windows on the
Edit Prediction configuration page.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
…ed-industries#51972)

## Context

Fork PRs receive a read-only `GITHUB_TOKEN`, causing 403 errors on all
label and comment writes
([example](zed-industries#51878)). This
splits the single workflow into two:

- **pr-size-check.yml** (`pull_request`): computes size and guided tour
detection, uploads a JSON artifact — read-only, works for forks
- **pr-size-label.yml** (`workflow_run`): downloads the artifact,
applies labels and comments — runs on the base repo with full write
access

### Security

- Artifact treated as untrusted data: fields are cast and validated
(`Number()`, `String()` + prefix check, `Boolean()`) before use
- No artifact content is executed or interpolated into shell
- Missing artifact handled gracefully (steps skip via output flag)

### Also included

- Structural guided tour detection: extracts "How to Review" section,
strips HTML comment placeholders, checks for actual author content
(fixes false positive in zed-industries#51957)
- Softer confirmation: "appears to include guidance"

Tested locally end-to-end against 4 real PRs
(XL/small/medium/false-positive).

## How to Review

1. `pr-size-check.yml` — the compute half. Compare against the previous
version: all write operations removed, artifact upload added at the end.
2. `pr-size-label.yml` — new file. Download artifact, validate, apply
labels/comments. Same label logic as before, just in a `workflow_run`
context.

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Content in Settings UI overflows on smaller window

3 participants