Which details to include?

The other day I returned home, opened the door and was startled to see my robot vacuum cleaner zigzagging across the  floor, its whiskers busily feeling for dust, the little creature ignoring me and going about its  business of vacuuming the floor.

What a perfect detail for a story, I thought.  So trivial, so unexpected, so easily noted and ignored like a microwave beeping.  Yet such a perfect detail to identify an early 21st century middle class tech-friendly household.

This led me to think:  What makes great detail in fiction?

Years ago I read that details naming and describing the setting of a story within the first few paragraphs help readers to orient themselves.  And if a character is involved, describing that character’s looks and emotional state right after the character is introduced also helps orient readers.

Take this example:  A frumpy grey-haired woman is pulled erect while hanging onto an overhead subway strap, eying with disdain a seated teen who ignores her and scrolls through his phone’s screen.

What do we learn about the setting?  The woman is on a crowded subway, so she must be in a city.  We don’t know the time of day or the season yet, but since the subway is crowded, we think it might be rush hour.  What do we learn about the woman?  We know she is well into middle age and is probably coming to or from work.  She is annoyed with the teen who won’t give up his seat.  All that from one sentence.

But suppose we replace the teen with an adult.  The woman “with a stifled smile, watches a fly perch on the head of a man in a crisp suit reading The Wall Street Journal.”  We’ve lost the emotion of annoyance but have introduced the woman’s sense of humor.  We’ve made it clearer that it is rush hour, and probably morning rush hour because the man’s suit is crisp.

Which details are important to the story?  Only the writer knows where this story is going, so only the writer knows which details are “telling,” that is leading readers to certain inferences without the writer naming them.  Most details should give greater depth of understanding to the reader.

But life is full of random, insignificant details, and some of those should be included too, like the fly on a man’s head or like a robotic vacuum cleaner zigzagging across a floor.

What's your thinking on this topic?