Skip to content

feat(database): roll an SObject's rows read and written into one bar - #958

Merged
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:feat-inspector-bulkification
Aug 25, 2026
Merged

feat(database): roll an SObject's rows read and written into one bar#958
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:feat-inspector-bulkification

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

📝 PR Overview

Query rows and DML rows are separate governor limits, so the Row budget section drew them as two bars. An SObject that a transaction both reads and writes was split across the two and whole in neither, so its real weight on the database was never on screen.

rowBudgets now also rolls the two budgets up per SObject, and the section shows that roll-up as one bar: hue says which way an object leans, hover gives the read and written split.

🛠️ Changes made

  • rowBudgets returns objects, every SObject once with rowsRead, rowsWritten and the two summed — biggest first, so the heaviest object leads.
  • The roll-up is empty unless both limits hold rows: with one limit holding everything it repeats the bar above it.
  • The two sides name an object from separate sources (a query plan or a FROM parse, against sObjectType), so the merge folds case.
  • The unknown label stays out of the roll-up: it is a bucket of objects, not one object.
  • A search is left out. SOSL holds rows against a per-query cap, not a transaction total, so it still reads as the worst single search.
  • The section is held out of the Database view until the section scrolling work, so nothing is user visible yet.

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

🔗 Related Issues

related #61

✅ Tests added?

  • 👍 yes
  • 🙅 no, not needed
  • 🙋 no, I need help

Service tests cover the roll-up order, the one-limit case, the case fold, the unknown label and the search. Component tests cover the segments, their read and written detail, and the section staying out when the service brings nothing together.

📚 Docs updated?

  • 🔖 README.md
  • 🔖 CHANGELOG.md
  • 📖 help site
  • 🧪 Marked any pre-release-only features (README 🧪 badge — see RELEASING.md)
  • 🙅 not needed

database-rows is still commented out of detailSections.ts, so this reaches no user yet. The CHANGELOG and help site entries come with the PR that puts the section on screen.

Query rows and DML rows are separate limits, so an SObject both read and
written was split across two bars and whole in neither.

rowBudgets now rolls the two budgets up per SObject, and the section shows
them as one bar: hue for which way an object leans, hover for the split.
Held out of the Database view until the section scrolling work.
@lcottercertinia
lcottercertinia merged commit 4841624 into certinia:main Aug 25, 2026
7 checks passed
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.

2 participants