docs: record what phase 6 built, and give the audit a floor to defend it
The plan's phase 6 becomes a record rather than a proposal, in the shape the earlier phases took: what was built, what was decided and why, what a person still has to look at. Two decisions in it were the product owner's rather than the code's -- promoting search and profile to navigation destinations, and doing chat alone rather than all three list-detail families -- and both are named as such with the date. **The audit learns two things.** It counted `NavigationBar(`, `NavigationRail(` and friends, and reported **zero** for an app that had just grown a navigation bar: `NavigationSuiteScaffold` is what chooses between them per breakpoint, and the concrete component never appears in the source. It now counts the scaffold and its items. And it grew a `floor()` beside `report()`. Every other budget in the file is a ceiling that ratchets down as a phase lands, which is the right shape for literals, hardcoded colours and untriaged nulls -- things a careless edit *adds*. The adaptive work is the opposite: a screen that stops reading the breakpoint still compiles and still renders, and the count goes down. So `--check` now also fails when the adaptive API count drops below 12 or the navigation component count below 2. **Two `contentDescription = null` that the audit caught in this phase's own work** -- the navigation item's icon and the new-chat button's -- now say `Decorative`. Same null, and the same convention phase 3 established: recording that somebody looked is the whole point, and a budget of zero only holds if new code obeys it too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,6 +68,7 @@ import press.mantra.compose.ui.composable.widgets.LocalSnackbarHostState
|
||||
import androidx.compose.ui.Alignment
|
||||
import press.mantra.compose.repository.FrostSigningRepository
|
||||
import press.mantra.compose.ui.composable.navigation.routes.ChatRoomMessagingRoute
|
||||
import press.mantra.compose.ui.composable.widgets.Decorative
|
||||
import press.mantra.compose.ui.composable.widgets.EmptyState
|
||||
import press.mantra.compose.ui.theme.breakpoint
|
||||
import press.mantra.compose.ui.theme.listPaneWidthFor
|
||||
@@ -397,8 +398,8 @@ private fun NewChatButton(onClick: () -> Unit) {
|
||||
icon = {
|
||||
Icon(
|
||||
Icons.Default.Add,
|
||||
// Decorative: the button's own text says "New chat" beside it.
|
||||
contentDescription = null,
|
||||
// The button's own text says "New chat" immediately beside it.
|
||||
contentDescription = Decorative,
|
||||
)
|
||||
},
|
||||
text = { Text(stringResource(Res.string.new_chat)) },
|
||||
|
||||
@@ -12,6 +12,7 @@ import androidx.navigation.NavDestination
|
||||
import androidx.navigation.NavHostController
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import org.jetbrains.compose.resources.stringResource
|
||||
import press.mantra.compose.ui.composable.widgets.Decorative
|
||||
import press.mantra.compose.ui.composable.navigation.routes.HomeRoute
|
||||
import press.mantra.compose.ui.theme.Breakpoint
|
||||
|
||||
@@ -117,12 +118,11 @@ fun MantraNavigationSuite(
|
||||
icon = {
|
||||
Icon(
|
||||
imageVector = destination.icon,
|
||||
// Null, and decided rather than defaulted: the label is
|
||||
// beside the icon in the bar and in the expanded rail, and a
|
||||
// reader would hear the name twice. The collapsed rail is the
|
||||
// exception, and it draws the label as a tooltip that the
|
||||
// accessibility tree still carries.
|
||||
contentDescription = null,
|
||||
// The label is beside the icon in the bar and in the expanded
|
||||
// rail, and a reader would hear the name twice. The collapsed
|
||||
// rail is the exception, and it draws the label as a tooltip
|
||||
// the accessibility tree still carries.
|
||||
contentDescription = Decorative,
|
||||
)
|
||||
},
|
||||
label = { Text(stringResource(destination.label)) },
|
||||
|
||||
Reference in New Issue
Block a user